Overview
Tabs organize peer views within the same context and let people move between them without leaving the page.
Related views
The active tab is visually and programmatically connected to its panel.
Content for Overview
Anatomy
Tabs consist of a tablist, ordered tab triggers, an active indicator, and one associated content panel.
- 1TablistRequired
Groups peer tabs and declares horizontal or vertical orientation.
- 2Tab triggerRequired
Names and activates one corresponding panel.
- 3Active indicatorRequired
Distinguishes the selected tab without relying on color alone.
- 4Tab panelRequired
Contains the view controlled by the selected trigger.
When to use
Use tabs when a small set of peer views belongs to one page context.
Recommended
- Switch between related views
Keep the page title and primary context stable while panel content changes.
- Organize manageable content
Use concise labels for a small, predictable set of categories.
- Preserve quick comparison
Let people move between views without a full navigation transition.
When not to use
Choose navigation or progressive disclosure when content is not peer-level.
Avoid
- Do not use for destinations
Use navigation links when each item has its own page, URL, or information hierarchy.
- Do not use for sequential tasks
Use a stepper for required ordered progress; StepTabs communicates progress, not peer views.
- Do not hide critical content
Use sections or Accordion when people need to read content together.
Variants
Visual variants must preserve the same tab semantics and interaction model.
Underline
Default choice for page-level peer views.
Pill and filled
Compact choice for filters and tightly scoped views.
Vertical line
Useful when labels are longer or the view count is larger.
StepTabs
Shows progress through a sequential workflow.
States
Each trigger communicates selection, focus, availability, and optional supporting status.
| State | Trigger | Visual response | Interaction |
|---|---|---|---|
| Inactive | Another tab is selected | Neutral label | Can receive focus and activate |
| Hover | Pointer enters an enabled tab | Subtle emphasis | Signals availability |
| Focus | Keyboard navigation | Visible focus indicator | Arrow keys move focus |
| Active | Tab is selected | Indicator and emphasized label | Its panel is displayed |
| Disabled | View is unavailable | Reduced emphasis | Skipped by keyboard navigation |
| Complete | StepTabs step is finished | Completion mark and connector | May remain revisitable |
Behavior
Tabs use roving focus and keep every trigger associated with exactly one panel.
Focus movement
Arrow keys move focus through enabled tabs and wrap at list boundaries.
Panel relationship
Trigger and panel share a stable value used for IDs and ARIA references.
Overflow
Allow horizontal scrolling rather than shrinking labels beyond readability.
Mounted state
Use keepMounted only when inactive panel state must persist.
Accessibility
Tabs follow the ARIA tab pattern with one tabbable trigger, directional navigation, and labelled tab panels.
| Key | Action |
|---|---|
| Tab | Moves focus into the active tab, then into the active panel. |
| ←→ | Moves focus across horizontal tabs. |
| ↑↓ | Moves focus across vertical tabs. |
| HomeEnd | Moves focus to the first or last enabled tab. |
- Use concise, unique tab labels.
- Keep one trigger in the page tab order.
- Expose selected state with aria-selected.
- Connect every trigger and panel with stable IDs.
- Declare vertical orientation when applicable.
- Do not use disabled tabs to advertise unavailable features without explanation.
Content guidelines
Tab labels describe the view—not the action of opening it.
Use short nouns
Name the content category with one or two familiar words.
Overview
Keep labels parallel
Use the same grammatical pattern and level of specificity.
Overview · Activity · Settings
Avoid instructions
Do not add “View,” “Open,” or “Go to” before labels.
Billing
Use badges sparingly
Show actionable counts or status, not decorative metrics.
Messages 12
Examples
The examples below cover the supported visual treatments, orientations, overflow, subtitles, and sequential StepTabs pattern.
Underline (M3 primary)
Classic bottom-border active indicator — icon, badge, disabled states
Content for Overview
Pill / Segmented
Floating pill on a tinted background — great for filter controls
Content for All
Filled
Solid primary background on the active tab
Content for Design
Bordered
Outlined active tab — clean and minimal
Content for Day
Card tabs
Each tab styled as an individual card — supports icons
Content for Analytics
Floating pill
Elevated floating appearance with shadow on the active tab
Content for Overview
Bubble
Rounded bubble selection on a tinted container
Content for All posts
Gradient active
Gradient background on the active tab — great for pricing toggles
Content for Monthly
Vertical (line variant)
orientation=vertical stacks the tab list on the left — icons supported
Profile settings
Manage your profile information.
Scrollable
Overflow tabs scroll horizontally — scroll with mouse wheel or drag
Active: React— scroll left/right to see all tabs
StepTabs — wizard
Progress indicator for multi-step flows — done, active, and disabled states
Current step: profile
With subtitle
subtitle prop adds a small secondary line below each tab label
Content for Overview
Props / API
Tabs is the state provider; TabsList, TabsTrigger, and TabsContent form the compound structure. StepTabs exposes a separate progress API.
Tabs props
Props
StepTabs props
Props