Skip to content

Tabs

A set of layered sections of content displayed one at a time.

Make changes to your account here.

Install

Bash
npx @madeui/cli add tabs

Usage

TSX
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';

Composition

TSX
<Tabs>
  <TabsList>
    <TabsTrigger />
  </TabsList>
  <TabsContent />
</Tabs>

Line variant

Underline-style tabs: variant="line" on TabsList.

Overview of your project.

Disabled tab

The other tab is disabled.

Vertical

Use orientation="vertical" for vertical tabs.

Update your name and photo.

Icons

Update your account settings.

API reference

Built on Base UI Tabs. The tables below cover the props this library adds or changes — every other prop is forwarded to the underlying Base UI part; see the Base UI Tabs API reference for the full list.

Tabs (Root)

PropTypeDefaultDescription
valueany—Controlled selected tab value.
defaultValueany—
onValueChange(value: any) => void—
orientation'horizontal' | 'vertical''horizontal'
styleStyleXStyles—StyleX styles merged last — always win over the component’s own styles.

TabsList accepts variant: 'default' (filled pill list) or 'line' (underline). Tabs accepts orientation: 'horizontal' | 'vertical' (Base UI keyboard behavior follows).

TabsTrigger

PropTypeDefaultDescription
value (required)any—
disabledbooleanfalse
styleStyleXStyles—StyleX styles merged last — always win over the component’s own styles.

TabsContent

PropTypeDefaultDescription
value (required)any—
styleStyleXStyles—StyleX styles merged last — always win over the component’s own styles.

Styling

TabsList accept style (StyleXStyles, merged last so caller overrides always win) plus all native props of the element they render.

TabsTrigger must be inside TabsList.

Was this page helpful?