- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/tabs.json
Usage
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";
<Tabs> <TabsList> <TabsTrigger value="1">Tab 1</TabsTrigger> <TabsTrigger value="2">Tab 2</TabsTrigger> </TabsList> <TabsContent value="1">Tab 1 content</TabsContent> <TabsContent value="2">Tab 2 content</TabsContent> </Tabs>
Controlled
Use value and onValueChange to control the active tab programmatically.
Manage your profile information and preferences.
Variant
Use the variant prop on <TabsList /> to change the selection indicator style.
Default
Underline
Orientation
Use the orientation prop on <Tabs /> to lay out tabs horizontally or vertically.
Horizontal
Vertical
State
Disabled
Disable individual tabs with the disabled prop on <TabsTrigger />. Disabled tabs are not focusable or selectable.
Examples
Vertical with underline
Combine orientation="vertical" on <Tabs /> with variant="underline" on <TabsList />.
With icons
API Reference
Tabs
Root element. Manages tab state and layout.
| Prop | Type | Default |
|---|---|---|
value | string | - |
defaultValue | string | - |
onValueChange | (details: ValueChangeDetails) => void | - |
orientation | "horizontal" | "vertical" | "horizontal" |
className | string | - |
TabsList
Container for tab triggers and the selection indicator.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "underline" | "default" |
className | string | - |
TabsTrigger
Button that selects a tab. Must have a value matching a TabsContent panel.
| Prop | Type | Default |
|---|---|---|
value | string | required |
disabled | boolean | false |
className | string | - |
TabsContent
Panel shown when its tab is selected. Must have a value matching a TabsTrigger.
| Prop | Type | Default |
|---|---|---|
value | string | required |
className | string | - |
For a complete list of props, see the Ark UI documentation.