R

Tabs

4 parts

Anatomy

Import the parts and compose them. Each part forwards attributes to its underlying element.

vue
import {
  TabsRoot,
  TabsList,
  TabsTrigger,
  TabsContent,
} from '@robonen/primitives/tabs';

<TabsRoot>
  <TabsList />
  <TabsTrigger />
  <TabsContent />
</TabsRoot>

API Reference

TabsRoot

Root
PropTypeDescription
defaultValue?stringUncontrolled initial value.
orientation?'horizontal' | 'vertical'Orientation of the tab list.
dir?RovingDirectionWriting direction.
loop?booleanWrap keyboard navigation.
disabled?booleanDisable all tabs.
activationMode?'automatic' | 'manual'How tabs are activated.

TabsList

List

No props or events — renders its element and forwards attributes.

TabsTrigger

Trigger
PropTypeDescription
valuestringValue that links this trigger to a content panel.
disabled?booleanDisable this trigger.

TabsContent

Content
PropTypeDescription
valuestringValue that links this panel to a trigger.
forceMount?booleanKeep content mounted even when inactive.