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.
Parts
| Part | File | Does |
|---|---|---|
| Tabs | Tabs.vue | Groups all parts of the tabs, which switch between panels of content. |
| TabsContent | TabsContent.vue | Holds what its tab shows while that tab is selected. |
| TabsList | TabsList.vue | Groups the triggers that switch between the tabs. |
| TabsTrigger | TabsTrigger.vue | Lets the user switch to its tab. |
Anatomy
<Tabs>
<TabsList>
<TabsTrigger />
</TabsList>
<TabsContent />
</Tabs>Styling
All of Tabs’s styles live in tabs.json. New to styling in Frontic UI? How styling works →
Install
- npm packages
- @vueuse/core
- class-variance-authority
- reka-ui
API reference
Groups all parts of the tabs, which switch between panels of content.
Props 9
| Prop | Type | Default | |
|---|---|---|---|
| defaultValue | StringOrNumber | — | |
| |||
| orientation | DataOrientation | 'horizontal' | |
| |||
| dir | Direction | — | |
| |||
| activationMode | 'automatic' | 'manual' | 'automatic' | |
| |||
| modelValue | StringOrNumber | — | |
| |||
| unmountOnHide | boolean | true | |
| |||
| asChild | boolean | false | |
| |||
| as | AsTag | Component | — | |
| |||
| class | ClassValue | — | |
| |||
Events 1
| Event | Payload | |
|---|---|---|
| update:modelValue | payload: StringOrNumber | |
| ||
Slots 1
| Slot | Slot props | |
|---|---|---|
| default | { modelValue: string | number | undefined; } | |
| ||
Data attributes 3
| Data attribute | Values | |
|---|---|---|
| data-horizontal | — | |
| ||
| data-orientation | 'vertical' | 'horizontal' | |
| ||
| data-vertical | — | |
| ||