Skip to content

Tabs

Tabs organize content into separate views where only one view is visible at a time.

  • CSS
  • React

Maintained by Platform and Foundation

Ready to use

The Tabs component lets users switch between different views or sections of content within the same page, without navigating away. It organises related information in a compact, accessible way — improving content discoverability and reducing cognitive load. Tabs work best when content is related but needs to be divided into smaller, manageable sections such as product details, settings, or data panels.

The Tab Picker shares this tab strip’s visual, but it chooses a value instead of switching a panel. If the click doesn’t reveal content, that’s the component you want.

  1. Tabs
  2. Label

Use Tabs when:

  • You need to organise related content into separate sections within the same context.
  • Users should be able to switch between different views without leaving the page.
  • The pattern improves the clarity of complex or lengthy interfaces.

Avoid Tabs when:

  • The sections aren’t closely related, or users need to compare content side by side.
  • There are too many tabs — navigation becomes overwhelming.
  • Selecting an option chooses a value rather than revealing a panel — use a Tab Picker.

Scheme

Neutral or Contrast. The container picks up the scheme tokens so the tab item colours flip when the surrounding surface is dark — no per-tab overrides needed.

Variant

The selected tab carries a contrast fill behind it. It is painted from the selected state itself, so there is no fill variant to choose and nothing to set per tab — marking a tab selected is what gives it the fill.

State

Rested, Hover, Active, and Disabled. The active state is reinforced with a bolder weight, a coloured border and a contrast fill, so the cue isn’t carried by colour alone.

EV accent

A special border colour for the active tab when the Tabs sit inside an EV-tools surface. Use only for EV Tools — not as a general accent.

Desktop

Tabs sit in a single row at the top of the panel. Keep labels short enough to fit on one line so the comparison reads at a glance.

Tablet

Same row layout. Make sure the tab row doesn’t overflow horizontally — if labels grow, consider shorter wording or a different navigation pattern.

Mobile

Tabs can scroll horizontally when there’s no room for the full set. Keep each label short so the visible portion still names the section.

Use ARIA semantics so keyboard, focus, and assistive-tech behaviour come for free.

Do

Keep tab labels short, clear, and descriptive; ensure exactly one tab is selected at a time; provide visible focus indicators for keyboard users; use proper heading hierarchy within panels; pair an active visual with bold text or an underline so the cue isn’t colour-only.

Don't

Don’t mimic tab behaviour with <div> elements that lack ARIA roles, don’t allow multiple tabs to be selected at once, don’t remove inactive panels from the DOM (use hidden instead so accessibility holds), don’t auto-shift focus to the panel on tab switch (keep focus on the tab), don’t rely on colour alone to indicate the active tab, don’t let labels wrap or truncate, and don’t use tabs for unrelated or excessively long content (split it into separate pages).

Tab labels should name the section they reveal, in one or two words (“Overview”, “Specifications”, “Reviews”). Keep wording parallel across the row (all nouns or all verbs) so the comparison reads coherently, use sentence case, and avoid trailing punctuation. Each panel’s first heading should match or echo the tab label so screen-reader users find their bearings when focus moves into the content.