Components · Navigation & Layout

Tabs

Switches between related views in the same place.

Automated a11y scan passing Element: <div role="tablist"> + <div role="tabpanel">

Component Workbench

Switch between the live interactive preview, syntax-highlighted implementation code, copyable AI coding agent prompt, and designer anatomy blueprint.

Tabs · Canonical Spec

Active nodes: 3 worker instances running kernel 6.8 with zero evictions.

When to use it

Do

  • Use short labels.
  • Keep content that people don't need to compare side by side.

Don't

  • Use tabs for steps in a sequence.
  • Use so many tabs that they wrap or scroll.

Accessibility & Keyboard Interaction

Requirements for using this component accessibly, following the W3C ARIA Authoring Practices Guide.

Interaction / KeyBehavior & Compliance Requirement
Arrow Left / RightCycles active tab and reveals associated tabpanel.
Roving TabindexActive tab sets tabindex="0"; inactive tabs set tabindex="-1".

Tokens

Values update with the current theme.

RoleTokenCurrent value
Active Indicator--as-semantic-color-interactive-primary
Divider Border--as-semantic-color-border-subtle
Esc
↑↓ navigateEnter openEsc close