Skip to content

Tabs

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

The Tabs component allows users to switch between different views or sections of content within the same page, without navigating away. It helps organize related information in a compact and easily accessible way, improving content discoverability and reducing cognitive load.

Tabs are often used when content is related but needs to be divided into smaller, manageable sections — for example, product details, settings, or data panels.

Use Tabs when you need to:

  • Organize related content into separate sections within the same context.
  • Allow users to quickly switch between different views without leaving the page.
  • Improve the clarity of complex or lengthy interfaces.

Avoid using Tabs when:

  • The sections are not closely related or when users need to compare content side by side.
  • There are too many tabs that would make navigation overwhelming.

Quick summary of accessibility & consistency

Section titled “Quick summary of accessibility & consistency”
  • Follow accessibility best practices to ensure Tabs are fully operable and understandable for all users.
  • Use semantic roles and attributes according to the WAI-ARIA Authoring Practices.
  • Maintain logical focus order and provide visible focus states.
  • Make sure all tab actions are keyboard-accessible and that only one panel is visible at a time.
  • Ensure contrast ratios and labels meet accessibility standards for clarity and usability.
NameApplied asApplied to
color-background-neutral-default
Background colorTabs container (neutral)
color-background-neutral-default
Background colorTabs container (neutral)
color-background-contrast-default
Background colorTabs container (contrast)
color-background-contrast-default
Background colorTabs container (contrast)
color-fill-contrast-default
Background colorTab item (filled variant)
color-fill-contrast-default
Background colorTab item (filled variant)
color-foreground-neutral-default
Text colorTab item (neutral rested / hover / active)
color-foreground-neutral-default
Text colorTab item (neutral rested / hover / active)
color-foreground-neutral-muted
Text colorTab item (neutral disabled)
color-foreground-neutral-muted
Text colorTab item (neutral disabled)
color-foreground-contrast-default
Text colorTab item (contrast rested / hover / active)
color-foreground-contrast-default
Text colorTab item (contrast rested / hover / active)
color-foreground-contrast-muted
Text colorTab item (contrast disabled)
color-foreground-contrast-muted
Text colorTab item (contrast disabled)
color-border-neutral-muted
Border colorTab item (neutral rested / disabled)
color-border-neutral-muted
Border colorTab item (neutral rested / disabled)
color-border-neutral-default
Border colorTab item (neutral hover)
color-border-neutral-default
Border colorTab item (neutral hover)
color-border-contrast-muted
Border colorTab item (contrast rested / disabled)
color-border-contrast-muted
Border colorTab item (contrast rested / disabled)
color-border-contrast-default
Border colorTab item (contrast hover)
color-border-contrast-default
Border colorTab item (contrast hover)
color-border-ev-default
Border colorTab item (EV active)
color-border-ev-default
Border colorTab item (EV active)
NameApplied asApplied to
 
spacing-xs
Padding blockTab item
 
spacing-xs
Padding blockTab item
 
spacing-md
Padding inlineTab item
 
spacing-md
Padding inlineTab item
 
spacing-none
GapTabs container
 
spacing-none
GapTabs container
NameApplied asApplied to
Lorem Ipsum
typography-body-6 (emphasis)
Text styleTab item (selected)
Lorem Ipsum
typography-body-6 (emphasis)
Text styleTab item (selected)
Guidance on how to use a component.
  • Keep tab labels short, clear, and descriptive.
  • Ensure there is always one — and only one — selected tab.
  • Provide visible focus indicators for keyboard users.
  • Use proper heading hierarchy within panels to maintain logical document structure.
  • Avoid using tabs if content loads asynchronously without clear feedback — provide a loading indicator if necessary.
  • Maintain sufficient color contrast for active and inactive states.
  • Use the blue option only for EV Tools.
  • Use the tabs without fill as default. Use the fill only in specific scenarios where this fill is needed (e.g. EV Tools such as Charging Time Calculator).
Guidance on what to avoid when using a component.
  • Don’t use <div> elements without appropriate ARIA roles to mimic tab behavior.
  • Don’t allow multiple tabs to be selected at the same time.
  • Don’t remove inactive panels from the DOM — use hidden instead to preserve accessibility.
  • Don’t change focus automatically to the tab panel when switching tabs; keep focus on the active tab.
  • Don’t rely solely on color or visual styling to indicate which tab is active — use additional cues like bold text or underlines.
  • Don’t create tab labels that wrap onto multiple lines or truncate important information.
  • Don’t use tabs for unrelated or excessively long content; consider splitting it into separate pages instead.