Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

Tabs

<Tabs> (alias <TabGroup>) and <Tab> put parallel content into tabs, with the selection synced across pages.

Put parallel content in tabs (alias <TabGroup>). Switching works even without JavaScript.

<Tabs>
  <Tab title="macOS" icon="fa-brands fa-apple">
    ```bash
    brew install node
    ```
  </Tab>
  <Tab title="Windows" icon="fa-brands fa-windows">
    Download the installer from nodejs.org.
  </Tab>
  <Tab title="Linux" icon="fa-brands fa-linux">
    Use your distribution's package manager, or nvm.
  </Tab>
</Tabs>
brew install node

Download the installer from nodejs.org.

Use your distribution's package manager, or nvm.

Cross-page sync

There are three ways to sync. The selection is saved in the browser and still applies when you visit other pages:

SyntaxSync scope
<Tab language="python">Syncs with every code group, API example, and tab of the same language across the site
<Tabs group="os">Syncs with tabs across the site that have the same group and the same title
<Tabs sync>Syncs by title with every tab that sets sync

The two tab sets below share group="os"; switch one and the other follows:

First set: macOS
First set: Linux
Second set: macOS
Second set: Linux

Tabs props

groupstring
Sync group (syncKey and groupId also work).
syncbooleanDefault false
Sync by title with every tab that sets sync.
defaultTabIndexnumberDefault 0
Initially selected tab (zero-based; defaultIndex also works).

Tab props

titlestringRequired
Tab label.
languagestring
Shares a sync key with code blocks of the same language across the site.
iconicon
Icon before the label.
idstring
Panel id; visiting #id selects this tab automatically.