Toggle Sidebar B
header.lightDarkMode D

Tabs

View switcher with three visual variants (pill, segmented, underline) and three sizes. Optional swipe gesture on mobile and automatic horizontal overflow scroll.

Variants

Pill for compact pickers in a toolbar, segmented for equivalent groupings, underline for longer section navigation.

Pill variant.
Segmented variant.
Underline variant.

Sizes

sm (h-7), md (h-8, default), lg (h-10).

Size sm (h-7).
Size md (h-8), the default.
Size lg (h-10).

With icons

Drop an Icon inside each trigger alongside the label.

Overview panel.

Disabled trigger

Add disabled to a TabsTrigger to block it.

Account panel.

Overflow scroll

When triggers exceed the width, the list scrolls horizontally instead of wrapping.

January panel. Too many tabs scroll horizontally.

Controlled

Drive the active tab from outside with v-model.

Active: account
Account panel.

Swipe (mobile)

swipe enables left/right gestures to change tabs. Carousels, tables, and nested tablists are excluded automatically.

On mobile, swipe left or right in this area to change tabs.

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.

home

Swipe or scroll horizontally to move between panels. The indicator follows the scroll position where supported.

files

Swipe or scroll horizontally to move between panels. The indicator follows the scroll position where supported.

settings

Swipe or scroll horizontally to move between panels. The indicator follows the scroll position where supported.

API Reference

Props, events, and slots for each sub-component.

Tabs

Props

PropTypeDefaultDescription
modelValuestringActive tab value. Supports v-model.
defaultValuestringStarting active tab when v-model is not used.
variant"pill" | "segmented" | "underline""pill"Visual style of the tab list and triggers.
size"sm" | "md" | "lg""md"Trigger height.
swipebooleanfalseEnable left/right swipe to change tabs on mobile.
swipeablebooleanfalseEnable the scroll-snap carousel mode. Use with TabsCarousel + TabsCarouselPanel and optionally TabsSelectionIndicator. Distinct from swipe.
swipeExcludestring[]["[aria-roledescription=carousel]", ".pswp", ...]CSS selectors excluded from the swipe gesture.

Events

EventDescription
update:modelValueFires when the active tab changes. Enables v-model.

TabsList

Props

PropTypeDefaultDescription
classstringRow of triggers. Must contain a TabsIndicator for the sliding marker.

TabsTrigger

Props

PropTypeDefaultDescription
valuestringIdentifier matched against the active tab value.
disabledbooleanfalseDisable this trigger.

TabsContent / TabsIndicator

Props

PropTypeDefaultDescription
valuestring(TabsContent) Panel shown for the matching trigger. TabsIndicator renders the sliding marker.

TabsCarousel

Props

PropTypeDefaultDescription
classstringHorizontal scroll-snap container. Wraps TabsCarouselPanel children and syncs the active tab with the scroll position. Requires swipeable on Tabs.

TabsCarouselPanel

Props

PropTypeDefaultDescription
valuestringCarousel panel matched against the active tab value. Always mounted and laid out side by side.

TabsSelectionIndicator

Props

PropTypeDefaultDescription
classstringScroll-driven marker that tracks the carousel position. Place inside TabsList; it measures the triggers automatically. Only visible where scroll-driven animations are supported (Chrome 125+).

Accessibility

Keyboard shortcuts and ARIA behavior.

Keyboard

ShortcutDescription
Moves to the previous tab (horizontal orientation).
Moves to the next tab (horizontal orientation).
Moves to the previous tab (vertical orientation).
Moves to the next tab (vertical orientation).
HomeMoves to the first tab.
EndMoves to the last tab.
EnterActivates the focused tab (manual activation).
SpaceActivates the focused tab (manual activation).
  • 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.