UI Components
Tabs
A composable tab component for switching between content panels โ built as Tabs + TabsList + TabsTrigger + TabsContent
Quick Preview
Your dashboard overview with key metrics and recent activity.
Installation
// Copy the Tabs component fromsrc/components/ui/Tabs.tsx
Usage
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/Tabs'export default function Example() {return (<Tabs defaultValue="tab1"><TabsList><TabsTrigger value="tab1">Tab 1</TabsTrigger><TabsTrigger value="tab2">Tab 2</TabsTrigger></TabsList><TabsContent value="tab1">First tab content</TabsContent><TabsContent value="tab2">Second tab content</TabsContent></Tabs>)}
Examples
With Disabled Tab
3 active campaigns running.
Code Viewer Pattern
Live preview here
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
defaultValue | string | - | Initial selected tab (uncontrolled mode) |
value | string | - | Controlled selected tab value |
onValueChange | (value: string) => void | - | Callback when tab changes |
children* | React.ReactNode | - | TabsList + TabsContent elements |
Features
- โComposition pattern: Tabs + TabsList + TabsTrigger + TabsContent
- โControlled and uncontrolled modes
- โARIA roles: tablist, tab, tabpanel
- โKeyboard accessible (focus-visible ring)
- โDisabled tab support