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.

Many tabs ​

When the tabs don't fit, the list scrolls sideways. The scrollbar is hidden, the tabs fade at whichever edge has more past it (the background stays put), and the selected tab is always scrolled fully into view, including on load.

Vertical ​

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

Name, photo and the email invoices are sent from.

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
unstyledboolean—Drop built-in classes
classstring—Merged with the built-in classes
ui{ root?, frame?, list?, indicator?, trigger?, content? }—Per-element 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.