Tabs
A set of layered sections of content, displayed one at a time.
Default
A segmented track. The active tab is a white pill with a thin shadow that slides between tabs.
Numbers you rent from Smallest, billed monthly.
Line
Pass variant="line" to TabsList for text tabs on a hairline, marked by a 2px foreground bar. Use it for page-level sections.
Owner, admin, member and guest. Built-in roles cannot be edited.
Icons
Place a Central Icon before the label. Triggers size it to 16px in both variants.
Disabled
Pass disabled to a TabsTrigger. It dims to 50% and cannot be selected.
Controlled
Pass value and onValueChange to drive the selected tab from state, for example to keep it in the URL.
2,860 calls in the last 7 days.
Best practices
When to use
- Use for a small number (two to five) of peer views that share one page-level context, such as Rented and Imported numbers.
- Use Stepper for an ordered flow, Breadcrumb for hierarchy, and a Dropdown or Select when there are more options than fit on one line.
Behavior
- The default segmented variant is for switching views inside a card or toolbar; use variant="line" for page-level sections.
- Use one variant per surface and do not nest Tabs.
- Control value and onValueChange when the selection should persist in the URL or survive navigation.
- Disable a trigger only when the view exists but is unavailable; hide it if it never applies.
Content
- Labels are one or two sentence-case words; icons are optional and must be used on every tab or none.
Accessibility
- Every TabsTrigger needs a matching TabsContent value so the tab controls a labelled panel.