Vesture
Get started

Navigation

Tabs

A compound tabs component with full roving-tabindex keyboard navigation. Inactive panels unmount, unlike Accordion.

TabsTabsListTabsTriggerTabsPanel

Preview

Update your name, email, and profile photo.

Usage

tsx
import { Tabs, TabsList, TabsTrigger, TabsPanel } from "@vesture/react";

<Tabs defaultValue="account">
  <TabsList>
    <TabsTrigger value="account">Account</TabsTrigger>
    <TabsTrigger value="security">Security</TabsTrigger>
  </TabsList>
  <TabsPanel value="account">Account settings…</TabsPanel>
  <TabsPanel value="security">Security settings…</TabsPanel>
</Tabs>

Behavior

  • ArrowRight/ArrowDown → next tab, ArrowLeft/ArrowUp → previous (looping), Home/End → first/last.
  • Navigation both focuses and activates the target tab.
  • Controlled (value/onValueChange) or uncontrolled (defaultValue).

Props

Tabs

PropTypeDefaultDescription
defaultValuestring""Uncontrolled initial tab.
valuestringControlled selected tab.
onValueChange(value: string) => voidFires on tab change.

TabsTrigger

PropTypeDefaultDescription
valuestringRequired. Matches a TabsPanel's value.

TabsPanel

PropTypeDefaultDescription
valuestringRequired. Unmounted while not selected.