Use the tabs shortcode with tab children to render a tabbed interface. Each tab becomes a clickable panel; its inner content supports Markdown.

Usage

{{< tabs "unique-id" >}}
{{< tab "Tab one" >}}
Content for the first tab.
{{< /tab >}}
{{< tab "Tab two" >}}
Content for the second tab.
{{< /tab >}}
{{< /tabs >}}

Parameters

ShortcodePositionRequiredDescription
tabs0YesUnique ID for this tab group. Must be distinct per page when using multiple tab groups.
tab0YesLabel shown on the tab button.

tab must always be a direct child of tabs.

Synced tabs

Tab selection is persisted in localStorage and synced across all tab groups on the page and across pages. When a user clicks a tab, every other tab group that contains a tab with the same label (case-insensitive) switches to that tab automatically — including on subsequent page visits. Use consistent labels across groups — e.g. always "npm", "pnpm", "yarn" — to take advantage of this.

Example

Preview
{{< tabs "install" >}}
{{< tab "npm" >}}
```bash
npm install @thulite/doks-core
```
{{< /tab >}}
{{< tab "pnpm" >}}
```bash
pnpm add @thulite/doks-core
```
{{< /tab >}}
{{< tab "yarn" >}}
```bash
yarn add @thulite/doks-core
```
{{< /tab >}}
{{< /tabs >}}