Tab child defines a trigger label and the content shown when that tab is active.
Basic Usage
Tabs let you split related content across panels that share the same space, showing one at a time. Wrap a set ofTab blocks in a Tabs container; each Tab takes a visible title and a value that identifies it, and the Tabs value sets which panel opens first. Use tabs to keep a busy screen — like a settings page with separate account and password sections — organized without forcing the user to scroll past everything at once.
Variants
Thevariant prop controls the visual style of the tab triggers. The default uses a pill-style background, while "line" uses an underline indicator.
Orientation
Setorientation="vertical" to stack the tab triggers in a column alongside the content.
State Tracking
Give Tabs aname to sync the active tab with client state. Other components can then read or change which tab is active — useful for building wizard flows or linking navigation between different parts of the UI.
Tabs with State
API Reference
Tabs Parameters
Visual style:
"default" (pill background) or "line" (underline indicator).Layout direction:
"horizontal" (triggers above content) or "vertical" (triggers beside content).Value of the initially active tab. If omitted, the first tab is active.
State key for tracking the active tab. Enables reading/writing the active tab from other components.
Action(s) triggered when the active tab changes.
Additional Tailwind CSS classes.
Protocol Reference
Tabs
Tab