Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Tabs (:::tabs, :::tab-item)

To use tabs, add :::tab-item children nested inside :::tabs.

Each :::tab-item directive must specify its tab label in square brackets (e.g. :::tab-item[JavaScript]). The tab label is displayed (with auto-capitalization), is added to the URL as a query parameter when the tab gets selected, and is used for tab selection syncing when multiple :::tabs directives are present on the page.

Example:

Markdown
::::tabs

:::tab-item[JavaScript]

```js
console.log('hello world');
```

:::

:::tab-item[yaml]

```yaml
note: Programming language tab labels are auto-capitalized.
```

:::

:::tab-item[arbitrary]

Arbitrary **content** _is_ supported.

:::

::::

Output:

JavaScript
console.log('hello world');