tabs

Tabs

Switches between panels of related content, such as a product's description and details; a filled or underlined list, in a row or a column, mirrored in a right-to-left page.

States: Default, Hover, Focus, Disabled

Parts

PartFileDoes
TabsTabs.vueGroups all parts of the tabs, which switch between panels of content.
TabsContentTabsContent.vueHolds what its tab shows while that tab is selected.
TabsListTabsList.vueGroups the triggers that switch between the tabs.
TabsTriggerTabsTrigger.vueLets the user switch to its tab.

Anatomy

<Tabs>
  <TabsList>
    <TabsTrigger />
  </TabsList>
  <TabsContent />
</Tabs>

Styling

PartRecipe
Tabstabs
TabsContenttabs-content
TabsListtabs-list
TabsTriggertabs-trigger
TabsTriggertabs-trigger-indicator

Install

Writes 6 files into components/ui/tabs/. For agents, npx @frontic/ui docs tabs prints this reference as markdown; the MCP server serves the same.

npm packages
@vueuse/core
class-variance-authority
reka-ui

API reference

Tabs Tabs.vue

Groups all parts of the tabs, which switch between panels of content.

PropTypeDefault
defaultValueStringOrNumber—
orientationDataOrientation'horizontal'
dirDirection—
activationMode'automatic' | 'manual''automatic'
modelValueStringOrNumber—
unmountOnHidebooleantrue
asChildbooleanfalse
asAsTag | Component—
classClassValue—
EventPayload
update:modelValuepayload: StringOrNumber
SlotSlot props
default{ modelValue: string | number | undefined; }
Data attributeValues
data-horizontal—
data-orientation'vertical' | 'horizontal'
data-vertical—
Recipe tabsSets
base: tabs 2 properties

TabsContent TabsContent.vue

TabsList TabsList.vue

TabsTrigger TabsTrigger.vue

Example
State