Skip to content
Readsmith

Tabs

Tabs present one choice among alternatives: install paths, operating systems, languages. The first tab is server-rendered so the page reads correctly with no JavaScript; a small island then wires keyboard navigation and selection.

Basic tabs

Install with Homebrew, then verify with docker --version.

<Tabs>
  <Tab title="macOS">...</Tab>
  <Tab title="Linux">...</Tab>
  <Tab title="Windows">...</Tab>
</Tabs>

Synced tabs

Give several Tabs blocks the same group and they switch together across the whole page. Pick "Linux" in either block below and both follow:

First block, macOS content.
Second block, macOS content: synced with the first.
<Tabs group="os">
  <Tab title="macOS">...</Tab>
  <Tab title="Linux">...</Tab>
</Tabs>

Props

Prop On Type Effect
title Tab string The tab's label
group Tabs string Page-wide sync key: same group, same selection
Was this page helpful?