Primitives
Tabs
File tabs. Tabs switches a panel in place; TabNav is a row of route links. One brand underline travels to the active tab, a Phosphor icon fills when active and grows on hover.
Preview
Installation
Resolves dependencies, copies the source, and installs npm packages automatically.
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| indicator | ReactNode | - | A glyph before the label of the active tab, for tabs with no icon. None by default (Tabs, TabNav) |
| defaultValue | string | - | Initially active tab (uncontrolled) |
| value | string | - | Controlled active tab |
| onValueChange | (value: string) => void | - | Callback when active tab changes |
| end | ReactNode | - | Pinned right, outside the scroller, as muted meta (TabsList, TabNav) |
| icon | ReactNode | Icon | - | An element, or a Phosphor icon that fills when active and grows on hover |
| active | boolean | false | Marks the current route (TabNavLink) |
| asChild | boolean | false | Renders your router's link (TabNavLink) |