Tabs
Tabs organize content into separate views where only one view can be visible at a time.
Import
import { Tabs, Row, Col } from '@sigx/daisyui';
Basic Usage
Simple tabs without content panels - just tab buttons:
Loading preview...
Tabs with Content
When tabs include a content property, the component uses DaisyUI's native radio input pattern for seamless content switching:
Loading preview...
Variants
Box
Loading preview...
Border
Loading preview...
Lift
Loading preview...
Rich Content
Tab content can include JSX elements and SignalX components:
Loading preview...
Sizes
Loading preview...
Disabled Tabs
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
tabs | Tab[] | required | Array of tab objects with id, label, and optional content |
activeTab | string | required | ID of the currently active tab |
onChange | (id: string) => void | required | Called when a tab is clicked |
variant | 'box' | 'border' | 'lift' | undefined | Tab style variant |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Tab size |
position | 'top' | 'bottom' | 'top' | Position of tabs relative to content |
contentClass | string | undefined | Additional CSS classes for tab content panels |
class | string | undefined | Additional CSS classes for the tabs container |
Tab Object
| Property | Type | Description |
|---|---|---|
id | string | Unique tab identifier |
label | string | JSX.Element | Tab label (text or JSX) |
content | string | JSX.Element | Optional tab content panel |
disabled | boolean | Whether the tab is disabled |