Tabs
Tabbed content for showing multiple options or variants.
Tabs organize content into switchable panels, perfect for showing multiple options, code variants, or platform-specific instructions.
Basic Tabs
With Rich Content
Tabs can contain any content, not just code:
Installation on macOS
Download the installer or use Homebrew:
Installation on Windows
Download the installer or use winget:
Installation on Linux
Use your package manager:
With Icons
Add icons to tab titles:
Synced Tabs
Tabs with the same group ID stay in sync across the page:
When you select a tab in one group, all matching groups update.
Tab Props
| Prop | Type | Description |
|---|---|---|
title | string | Tab label (required). Without it tabs are labelled "Tab 1", "Tab 2", and so on |
icon | string | Optional icon: a name from the icon set, or a language glyph such as typescript, python, go, rust, curl (typescript, javascript, python, go, ruby, php, java, bash, shell, rust, curl, file — on doc engine v1 and v2). An unknown name draws nothing |
children | ReactNode | Tab content |
Tabs Props
| Prop | Type | Description |
|---|---|---|
group | string | Sync ID for linked tabs |
variant | "underline" | Flat text tabs over a rule that scroll sideways when they overflow. Omit for the default pill row |
children | Tab[] | Tab components |
Underline variant
Overview content
Configuration content
CodeGroup vs Tabs
Use <CodeGroup> for code-only content, where the reader's language choice can carry across pages:
Use <Tabs> for mixed content or non-code options:
Sign up at syntext.dev and follow the onboarding flow.
Export a static build and host it yourself:
Keyboard and screen readers
A tab bar is a real ARIA tablist: each label is a tab, each panel is a
tabpanel wired to the label that controls it, and the whole group is a single
Tab stop. Once a label has focus, ← and → (or
↑ / ↓) move between tabs, Home jumps
to the first and End to the last. <CodeGroup> language rows and
the request-sample language row on API reference pages behave the same way.
<Tabs> renders on guide pages and on API reference pages alike.
Without JavaScript
If the page's script does not run, a tabbed group falls back to plain stacked
content: every panel is shown in source order, with its title above it.
Nothing an author wrote is hidden behind a control that cannot appear.
<CodeGroup>, <Accordion> and <Expandable> degrade the same way.
That fallback is doc engine v1 behaviour. On doc engine v2, only the active tab and accordions that start open are shown without JavaScript.
Best Practices
Keep tab titles short (1-2 words). Use icons to add context without lengthening titles.
group prop for related tab sets that should sync