Components · Navigation · Tabs
Back to Tabs typesTabs
Use for switching between a small set of related views or sections, like settings pages or a product detail's content panes - one Tabs component, controlled by properties, with exactly one tab active at a time.
Properties
Size, corner radius and labels are properties of the same component, not separate tabs glued together - change them below to check this bar's style and states in the Live Preview. Trigger count follows the number of labels entered.
Live Preview
Both types compared side by side, each in all 6 states - the first tab demonstrates the row's state while the second tab stays the constant active tab and the rest stay neutral. One full matrix is rendered per selected combination of Size and Corner radius. Vertical orientation, per-tab leading icons, and overflow handling (horizontal scroll or a "More" menu) are each a separable, larger feature and aren't built here.
When to use
Any small, fixed set of related views or sections where only one is shown at a time.
Component Guide
Overview
Tabs switch between a small, fixed set of related views or sections with exactly one active at a time - a horizontal row of triggers above the content they control, used when several views belong together but only one needs to be visible at once.
When to Use
- Settings pages split into related sections - Profile, Security, Notifications.
- A product detail's content panes - Overview, Specifications, Reviews.
- Dashboard or account views sharing the same context - switching between related views without leaving the page.
When Not to Use
- A sequence the user moves through in order, with a clear beginning and end - use Steps instead of Tabs, which implies free switching, not progression.
- More views than fit comfortably in a single row - beyond roughly 5-7 tabs, consider a Menu, Dropdown, or a redesigned navigation instead of a horizontally scrolling tab bar.
- Views that aren't actually related - unrelated destinations belong in real navigation (a sidebar, a Breadcrumb-backed hierarchy), not a tab set implying siblings.
Best Practices
- Keep tab labels short and parallel in structure (all nouns, or all short phrases) so the row scans easily.
- Preserve the active tab across a page reload or back navigation when the URL or state allows it.
- Avoid nesting tabs within tabs - it quickly becomes disorienting to track which level is active.
Do and Don't
Do
A handful of parallel views over the same object, one visibly active, each reachable in a single click.
Don't
Eight tabs forces the row to scroll sideways, so most of them are invisible until the user thinks to swipe. Group the overflow into a Menu or a nested page instead.
Accessibility
- Implemented with tab/tabpanel roles, so arrow keys move between tabs and the association between a tab and its panel is explicit.
- The active tab is exposed via aria-selected, not communicated by color alone.
- Focus moves logically into the panel's content (or stays manageable) when a new tab is activated, rather than getting lost.
Related Components
Steps, Menu, Breadcrumb.
{
"component": "Tabs",
"category": "Navigation",
"summary": "Tabs switch between a small, fixed set of related views or sections with exactly one active at a time - a horizontal row of triggers above the content they control, used when several views belong together but only one needs to be visible at once.",
"whenToUse": [
"Settings pages split into related sections - Profile, Security, Notifications.",
"A product detail's content panes - Overview, Specifications, Reviews.",
"Dashboard or account views sharing the same context - switching between related views without leaving the page."
],
"whenNotToUse": [
"A sequence the user moves through in order, with a clear beginning and end - use Steps instead of Tabs, which implies free switching, not progression.",
"More views than fit comfortably in a single row - beyond roughly 5-7 tabs, consider a Menu, Dropdown, or a redesigned navigation instead of a horizontally scrolling tab bar.",
"Views that aren't actually related - unrelated destinations belong in real navigation (a sidebar, a Breadcrumb-backed hierarchy), not a tab set implying siblings."
],
"bestPractices": [
"Keep tab labels short and parallel in structure (all nouns, or all short phrases) so the row scans easily.",
"Preserve the active tab across a page reload or back navigation when the URL or state allows it.",
"Avoid nesting tabs within tabs - it quickly becomes disorienting to track which level is active."
],
"doAndDont": {
"do": "A handful of parallel views over the same object, one visibly active, each reachable in a single click.",
"dont": "Eight tabs forces the row to scroll sideways, so most of them are invisible until the user thinks to swipe. Group the overflow into a Menu or a nested page instead."
},
"accessibility": [
"Implemented with tab/tabpanel roles, so arrow keys move between tabs and the association between a tab and its panel is explicit.",
"The active tab is exposed via aria-selected, not communicated by color alone.",
"Focus moves logically into the panel's content (or stays manageable) when a new tab is activated, rather than getting lost."
],
"relatedComponents": [
"Steps",
"Menu",
"Breadcrumb"
]
}