Back to Components

Navigation

Tabs

Pill-style tab strip with optional counts. Vertical (default) or horizontal.

Examples

Horizontal with counts

<Tabs
  direction="horizontal"
  tabs={[
    {value: 'books', label: 'Books', count: 1204},
    {value: 'passages', label: 'Passages', count: 8421},
    {value: 'authors', label: 'Authors', count: 312},
  ]}
  bind:value
/>

Props

PropTypeDefaultDescription
tabs{value, label, count?, disabled?}[]Tab definitions. Bind by value.
valueTBindable selected value.
direction'vertical' | 'horizontal''vertical'Layout direction.
onChange(next: T) => voidOptional change callback.
ariaLabelstringAccessible label for the tablist.

Install

CLI

npx @a3tai/mittsu add tabs