{{< tab-container >}}

Description#


The tab-container shortcode allows you to organize content in tabs. To do so, nest as many tab shortcodes as needed inside a parent tab-container shortcode.
For example, display instructions depending on the operating system used.

The rendering of tabs is always in markdown.
The tab shortcode must always be nested inside a tab-container shortcode.

Parameters#


tab-container#

NameType(named/positional)Description

tab#

NameType(named/positional)Description
titlenamedTab title.
NB: If not specified, the title is a default text defined by the theme.

Examples#


MarkdownRendering
{{</* tab-container */>}}
{{</* tab
    title="First tab"
*/>}}
I am the **first** tab content.
{{</* /tab */>}}
{{</* tab
    title="Second tab"
*/>}}
I am the **second** tab content.
{{</* /tab */>}}
{{</* tab */>}}
I am the **third** tab content.
{{</* /tab */>}}
{{</* /tab-container */>}}
I am the first tab content.
I am the second tab content.
I am the third tab content.
{{</* tab-container */>}}
{{</* tab
    title="Linux"
*/>}}
Install on **Linux**:
```bash
sudo apt install my-package
```
{{</* /tab */>}}
{{</* tab
    title="macOS"
*/>}}
Install on **macOS**:
```bash
brew install my-package
```
{{</* /tab */>}}
{{</* tab
    title="Windows"
*/>}}
Install on **Windows**:
```powershell
choco install my-package
```
{{</* /tab */>}}
{{</* /tab-container */>}}

Install on Linux:

sudo apt install my-package

Install on macOS:

brew install my-package

Install on Windows:

choco install my-package
{{</* tab-container */>}}
{{</* tab
    title="With snippet"
*/>}}
{{</* snippet
    file="templates/snippet.go"
    caption="I'm a legend"
    codelang="go"
    codeparam="linenos=table,hl_lines=[1,3,\"5-7\"],linenostart=10"
/*/>}}
{{</* /tab */>}}
{{</* tab
    title="Second tab"
*/>}}
I am the **second** tab content.
{{</* /tab */>}}
{{</* tab
    title="Third tab"
*/>}}
I am the **third** tab content.
{{</* /tab */>}}
{{</* /tab-container */>}}
I'm a legend
10
11
12
13
14
15
16
package main

import "fmt"

func main() {
  fmt.Println("Hello, World!")
}
I am the second tab content.
I am the third tab content.
{{</* tab-container */>}}
{{</* tab
    title="With alert"
*/>}}
{{</* alert type="warning" */>}}
I’m a **warning** type alert
{{</* /alert */>}}
{{</* /tab */>}}
{{</* tab
    title="Second tab"
*/>}}
I am the **second** tab content.
{{</* /tab */>}}
{{</* tab
    title="Third tab"
*/>}}
I am the **third** tab content.
{{</* /tab */>}}
{{</* /tab-container */>}}
I’m a warning type alert
I am the second tab content.
I am the third tab content.