Skip to main content

Tabs

Organises related content into selectable panels within a single view. Use to reduce cognitive load when content can be meaningfully divided into discrete sections. Don't use when all content should be visible simultaneously.

OverviewStyleAccessibility

Description

Tabs change the visible content within a page; they do not navigate between pages. For navigation, use the sidebar or breadcrumb components. In Figma the tab list can be placed on the top, bottom, start or end, can scroll, and tabs come in five sizes (XS to XL) with default, hover, selected and disabled states.

Anatomy

PartRequired?Notes
Tab list Required The container for all tab controls. Receives role="tablist".
Active tab Required The currently selected tab. Indicated by a 2px underline in the brand border colour, darker label text and aria-selected="true".
Inactive tab Required Unselected tabs. Receive aria-selected="false" and tabindex="-1" so they are not in the default tab order.
Disabled tab Optional A tab that cannot be selected right now. Dimmed label; selected tabs can be disabled too. Keep it in the tab order with aria-disabled="true" so people can discover why.
Scroll buttons Conditional Arrow buttons at each end of the tab list when the tabs overflow. Use the scrolling Tab Group in Figma.
Tab panel Required The content region associated with the active tab. Receives role="tabpanel" and is linked to its tab via aria-controls / aria-labelledby.

Variants

Usage guidelines

Do / Don't

Do

Keep tab labels short — one or two words. "Overview", "Activity", "Settings". Users scan tabs, not read them.

Don't

Don't put form elements that affect the whole page inside one tab. Actions that span tabs should live outside the tab component.

Do

Make the default tab the most commonly needed one. Don't default to a tab that's empty or rarely relevant.

Don't

Don't use tabs to create wizard-like flows. If completing step 2 depends on step 1, use a stepper.

Layout & Spacing

Element Spec
Tab height About 35 / 46 / 58 / 72 / 86px (XS to XL), medium 58px: vertical padding plus one line of text
Tab padding Vertical 8 / 12 / 16 / 20 / 24px, horizontal 12 / 16 / 24 / 32 / 40px. --orbit-tab-size-*-padding-block, -padding-inline
Gap (icon to label) 4 / 8 / 12 / 16 / 20px. --orbit-tab-size-*-gap
Active indicator 2px bottom border. --orbit-tab-indicator-width, --orbit-tab-selected-indicator
Tab list track 2px line along the tab list. --orbit-tab-group-track-*
Panel padding --op-space-20
Label font size 12 / 14 / 16 / 20 / 24px. --orbit-tab-size-*-font-size
Label weight Semibold on every tab. --orbit-tab-font-weight
Inactive label colour --orbit-tab-text
Active label colour --orbit-tab-selected-text

Component tokens

Framework-neutral CSS variables, so any framework can use them without Web Awesome. Colours follow Light and Dark mode and the product theme.

Token What it sets
--orbit-tab-text, -selected-text, -hover-text, -disabled-text Label colour per state.
--orbit-tab-selected-indicator, -disabled-indicator, -indicator-width The underline on the selected tab. The selected colour is the brand border colour, which meets 3:1 against the page.
--orbit-tab-state-hover Translucent overlay on hover.
`--orbit-tab-size-{xs s
--orbit-tab-group-track-color, -track-width The line running along the tab list.
`--orbit-tab-focus-ring-{color width}`
--orbit-tab-font-family, -font-weight Label type (semibold).

States are Default, Hover, Selected (with Disabled for each); focus is the ring.

Element Token
Tab list track --orbit-tab-group-track-color
Active indicator --orbit-tab-selected-indicator
Hover background --orbit-tab-state-hover
Disabled label and indicator --orbit-tab-disabled-text, --orbit-tab-disabled-indicator
Focus ring --orbit-tab-focus-ring-color, --orbit-tab-focus-ring-width, drawn inside the tab

Engineering notes

  • The tab navigation script uses **automatic activation** — selecting a tab immediately shows its panel. If loading a panel is slow or causes layout shift, use **manual activation**: arrow keys move focus between tabs but Enter or Space is required to activate.
  • Use hidden to hide inactive panels, not display: none via CSS classes — the hidden attribute is semantically meaningful to assistive technology.
  • The aria-label on the tablist describes the set of tabs as a whole ("Project details", "Component settings"). Don't duplicate individual tab labels.

Keyboard interaction

KeyAction
Tab Moves focus to the active tab (first pass), then into the panel content on the next press. Inactive tabs are skipped in the tab order.
Arrow Right / Arrow Left Moves focus between tabs. Wraps at either end.
Home Moves focus to the first tab.
End Moves focus to the last tab.
Enter or Space Activates the focused tab (required for manual-activation mode; optional in auto-activation mode).

Why it matters

Tabs have a specific keyboard pattern that differs from most components. Unlike a list of links, tabs use arrow keys to navigate between them — not Tab. This is intentional: it lets keyboard users skip past the entire tab list in one press when they want to reach the panel content directly. Deviating from this pattern breaks the experience for users who rely on assistive technology.

ARIA

Role or attributeWhen to useExample
role="tablist" Applied to the tab container. Groups the set of tabs. <div role="tablist" aria-label="Project details">
aria-label Applied to the tablist. Describes the purpose of the tab set (e.g. "Project details"). <div role="tablist" aria-label="Project details">
role="tab" Applied to each tab button. Identifies each item as a tab control. <button role="tab" id="tab-overview" aria-controls="panel-overview">Overview</button>
aria-selected Applied to each tab. "true" for the active tab, "false" for all others. <button role="tab" aria-selected="true">Overview</button>
aria-controls Applied to each tab. Points to the ID of the associated panel. <button role="tab" aria-controls="panel-overview">Overview</button>
role="tabpanel" Applied to each panel. Identifies the panel content region. <div role="tabpanel" id="panel-overview" aria-labelledby="tab-overview">
aria-labelledby Applied to each panel. Points to the ID of the controlling tab. <div role="tabpanel" aria-labelledby="tab-overview">

Things to avoid

  • Don't make all panels visible simultaneously to assistive technology — use hidden on inactive panels.
  • Don't use <a href> elements as tabs unless they genuinely navigate to a new URL. Tab controls should be <button> elements.
  • Don't put the focus indicator only on the active indicator underline — the full tab must receive a visible focus ring.

Was this page helpful?

Updated 2 October 2026