Tabs#

Tabs organize content into separate views where only one view can be visible at a time.

Import#

TSX
import { Tabs, Row, Col } from '@sigx/daisyui';

Basic Usage#

Simple tabs without content panels - just tab buttons:

TSX
Loading preview...

Tabs with Content#

When tabs include a content property, the component uses DaisyUI's native radio input pattern for seamless content switching:

TSX
Loading preview...

Variants#

Box#

TSX
Loading preview...

Border#

TSX
Loading preview...

Lift#

TSX
Loading preview...

Rich Content#

Tab content can include JSX elements and SignalX components:

TSX
Loading preview...

Sizes#

TSX
Loading preview...

Disabled Tabs#

TSX
Loading preview...

Props#

PropTypeDefaultDescription
tabsTab[]requiredArray of tab objects with id, label, and optional content
activeTabstringrequiredID of the currently active tab
onChange(id: string) => voidrequiredCalled when a tab is clicked
variant'box' | 'border' | 'lift'undefinedTab style variant
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Tab size
position'top' | 'bottom''top'Position of tabs relative to content
contentClassstringundefinedAdditional CSS classes for tab content panels
classstringundefinedAdditional CSS classes for the tabs container

Tab Object#

PropertyTypeDescription
idstringUnique tab identifier
labelstring | JSX.ElementTab label (text or JSX)
contentstring | JSX.ElementOptional tab content panel
disabledbooleanWhether the tab is disabled