Elements

Reference

Tabs

Tabs — tabbed navigation. Parts: Root, List, Trigger, Content, Indicator (machine-positioned ink bar on the list rule).

Root · List · Trigger · Content · Indicator

#Root

PropTypeDefaultDescription
sizeString as PropType<"sm" | "md" | "lg">"md"One rung of the control-height ladder for the tab rows.
variantString as PropType<"line" | "card">"line"The register: a ruled strip, or each selection lifted into a card.
orientationString as PropType<"horizontal" | "vertical">"horizontal"Which rail the rule rides: a strip across, or a rail down.
activationMode'manual' | 'automatic'"automatic"The activation mode of the tabs. Can be manual or automatic - manual: Tabs are activated when clicked or press enter key. - automatic: Tabs are activated when receiving focus
compositebooleanWhether the tab is composite
defaultValuestringThe initial selected tab value when rendered. Use when you don't need to control the selected tab value.
deselectablebooleanWhether the active tab can be deselected when clicking on it.
idstringThe unique identifier of the machine.
idsPartial<{ root: string; trigger: (id: string) => string; content: (id: string) => string; list: string; indicator: string; }>The ids of the elements in the tabs. Useful for composition.
loopFocusbooleantrueWhether the keyboard navigation will loop from last tab to first, and vice versa.
modelValuestringThe v-model value of the tabs
navigate(details: tabs.NavigateDetails) => voidFunction to navigate to the selected tab when clicking on it. Useful if tab triggers are anchor elements.
translationstabs.IntlTranslationsSpecifies the localized strings that identifies the accessibility elements and their states
EventPayload
focusChangedetails: FocusChangeDetails
valueChangedetails: ValueChangeDetails
update:modelValuevalue: string