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 nodeDownload 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:
| Syntax | Sync 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