Skip to main content

Tabs

Organizes content into tabbed sections. Supports underline and pill variants with keyboard navigation.

Underline Variant

Account settings content

Pill Variant

Overview content

Segmented Variant

segmented is a tighter, container-bound variant of pill — useful as a control-bar replacement (think iOS segmented control) for switching between 2-4 related views.

Day view

For a standalone segmented control without Tabs.Content panels, use the dedicated <SegmentedControl> primitive instead (component reference coming in Phase 7-c).

Mobile considerations

  • Tab triggers meet the 44px tap target on mobile (vertical padding scales automatically on coarse pointer).
  • For long tab lists (5+ items), the list scrolls horizontally with -webkit-overflow-scrolling: touch momentum and snap.
  • Active-tab indicator uses var(--tui-duration-base) + var(--tui-ease-in-out) for symmetric slide animation (Pattern D — layout shift).

With Disabled Tab

Active tab content

Tabs Props

PropTypeDefaultDescription
defaultValuestring-Initial active tab (uncontrolled mode)
valuestring-Active tab value (controlled mode)
onChange(value: string) => void-Callback when active tab changes
variant'underline' | 'pill' | 'segmented''underline'Visual variant
childrenReactNode-Children
classNamestring-Additional CSS class name
styleCSSProperties-Additional inline styles

Tabs.Trigger Props

PropTypeDefaultDescription
valuestring-Value that identifies this tab
disabledbooleanfalseDisable the trigger
childrenReactNode-Trigger label
classNamestring-Additional CSS class name

Tabs.Content Props

PropTypeDefaultDescription
valuestring-Value that identifies which tab this content belongs to
childrenReactNode-Panel content
classNamestring-Additional CSS class name