Tabs
Organize content into views. Avoid page reloads. Improve navigation.
storefront-apiReady
Deployment dpl_9fk2ax was promoted to production 12 minutes ago.
- Build time
- 42s
- Output size
- 218 kB
- Region
- iad1
- Commit
- 9fk2ax
Installation
pnpm dlx nachui add tabsAnatomy
Composition
Use the following composition to build a
Tabs:Variants
Vertical
Account
The details your teammates see.
- Full name
- Lucia Mendez
- lucia@acmestudio.dev
- Role
- Workspace owner
- Member since
- Aug 2023
Features
- Multiple variants - Default, outline, underline, and ghost styles
- Animated indicator - Smooth sliding active tab indicator
- Keyboard navigation - Full keyboard support
- Smooth transitions - Animated content switching
API Reference
Tabs
| Prop | Type | Default | Description |
|---|---|---|---|
defaultValue | string | - | Default active tab |
value | string | - | Controlled active tab |
onValueChange | (value: string) => void | - | Callback when tab changes |
variant | 'default' | 'outline' | 'underline' | 'ghost' | 'default' | Visual style |
size | 'default' | 'sm' | 'lg' | 'default' | Tab size |
className | string | - | Additional CSS classes |
Tabs.List
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'outline' | 'underline' | 'ghost' | Inherits | Override variant |
size | 'default' | 'sm' | 'lg' | Inherits | Override size |
className | string | - | Additional CSS classes |
Tabs.Trigger
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | Unique tab identifier |
variant | 'default' | 'outline' | 'underline' | 'ghost' | Inherits | Override variant |
size | 'default' | 'sm' | 'lg' | Inherits | Override size |
className | string | - | Additional CSS classes |
Tabs.Content
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | Matching tab identifier |
className | string | - | Additional CSS classes |
Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.