Tabs

Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy. Each tab should contain content that is distinct from other tabs in a set.

We rely on the Sphinx Design extension for implementing tabs.

Syntax

In MyST Markdown, tabs are created using the :::{tab-set} and :::{tab-item} directives. The basic format is:

::::{tab-set}

:::{tab-item} Label1
Content 1
:::

:::{tab-item} Label2
Content 2
:::

::::

Examples

Basic tabs

::::{tab-set}

:::{tab-item} Label1
Content 1
:::

:::{tab-item} Label2
Content 2
:::

::::

Renders:

Content 1

Content 2

See also


Last update: 29 Jan 2025