Tabs
View switcher with three visual variants (pill, segmented, underline) and three sizes. Optional swipe gesture on mobile and automatic horizontal overflow scroll.
Default
TabsList holds the triggers, each TabsContent renders the panel for its value. Pass default-value to pick the starting tab.
Make changes to your account here. Save when you're done.
Variants
Pill for compact pickers in a toolbar, segmented for equivalent groupings, underline for longer section navigation.
Underline
variant="underline" gives a transparent list with a sliding bottom border under the active trigger — the line style suited to page-level section navigation.
Sizes
Three heights: sm, md (default), and lg. Each follows the same ladder as Button — one step taller on phones, settling to its desktop height at the sm breakpoint.
With icons
Drop an Icon inside each trigger alongside the label.
Disabled trigger
Add disabled to a TabsTrigger to block it.
Overflow scroll
When triggers exceed the width, the list scrolls horizontally instead of wrapping.
Controlled
Drive the active tab from outside with v-model.
Swipe (mobile)
swipe enables left/right gestures to change tabs. Carousels, tables, and nested tablists are excluded automatically.
Swipeable carousel
swipeable turns the panels into a horizontal scroll-snap carousel built with TabsCarousel and TabsCarouselPanel. The active tab follows the scroll position and a scroll-driven TabsSelectionIndicator tracks your finger where supported (Chrome 125+), falling back to the sliding TabsIndicator elsewhere. This is separate from the swipe gesture prop.
API Reference
Tabs
TabsList
TabsTrigger
TabsContent / TabsIndicator
TabsCarousel
TabsCarouselPanel
TabsSelectionIndicator
TabNav
Accessibility
Keyboard shortcuts and ARIA behavior.
- Uses a roving tabindex; only the active tab is in the tab sequence.
- Applies tablist, tab, and tabpanel roles with aria-selected and aria-controls.
- Tabs activate automatically on focus by default.