Skip to content

Navigation

ITabs

Switches between panels on the same page. Items come from an array, and the indicator animates between triggers.

A string item becomes both the label and the value. Pass objects when the two differ, or when an item needs an icon or should be disabled.

Variants

solid sits the active tab on a filled pill; line underlines it, which suits tabs sitting directly above the content they switch.

Panels

Give each item a value and fill the matching named slot. Each slot receives the item it belongs to.

Four line items totalling €1,240.00.

Vertical

orientation="vertical" stacks the triggers down the side, and arrow-key navigation follows the orientation.

Keeping panels mounted

By default only the active panel is in the DOM. keepMounted renders them all and hides the inactive ones, which keeps form state, scroll position and anything expensive to rebuild.

vue
<ITabs v-model="tab" :items="items" keep-mounted />

Props

PropTypeDefaultDescription
items(TabsItem | string)[][]Tabs to render
variant'solid' | 'line''solid'Pill or underline
orientation'horizontal' | 'vertical''horizontal'Trigger direction, and arrow-key axis
keepMountedbooleanfalseRender every panel, hiding the inactive ones
unstyledbooleanDrop built-in classes
classstringMerged with the built-in classes
ui{ root?, list?, indicator?, trigger?, content? }Per-slot class overrides

The model is the active item's value, falling back to its label.

ts
interface TabsItem {
  label: string
  /** Identifies the tab. Defaults to the label. */
  value?: string
  icon?: IconLike
  disabled?: boolean
}

Slots

SlotWhen to use it
<value>The panel for that item, receiving { item }
triggerCustom trigger content, receiving { item }
listReplaces the whole trigger row
defaultReplaces the panel area entirely

For switching between pages rather than panels, use INavigationMenu or plain links.