Tabs
A tabbed interface with multiple style variants.
Default Tabs
Home content goes here
Pills Variant
Home content goes here
Underline Variant
Home content goes here
Usage
import { Tabs } from "@/components/tabs" import { Home, Package } from 'lucide-react' export default function MyComponent() { return ( <Tabs variant="pills" tabs={[ { id: "home", label: "Home", icon: <Home className="h-4 w-4" />, content: <div>Home content</div> }, { id: "products", label: "Products", icon: <Package className="h-4 w-4" />, content: <div>Products content</div> }, { id: "disabled", label: "Disabled", disabled: true, content: <div>Disabled content</div> }, ]} /> ) }
Props
Name
Type
Default
Description
tabs
array
required
Array of tab objects with id, label, content, icon, and disabled properties.
defaultTabId
string
first tab id
ID of the tab that should be active by default.
variant
string
"default"
Style variant: "default", "pills", or "underline".
className
string
undefined
Additional CSS classes to apply to the tabs container.