Tabs

Switch between related panels of content

Category: navigation · WCAG 2.2-AA · navigation, tabs, sections

States

Props

PropTypeDefaultDescription
defaultValuestringThe initial value when uncontrolled.
valuestringThe controlled value.
onValueChange(value: string) => voidCalled with the new value when it changes.

Design tokens

When to use

When not to use

How to build an accessible Tabs in React →

Examples

Basic

<Tabs defaultValue="account"><TabsList><TabsTrigger value="account">Account</TabsTrigger></TabsList><TabsContent value="account">…</TabsContent></Tabs>

Related components

← Back to docs