Tabs
A set of layered sections of content—known as tab panels—that are displayed one at a time.
Installation#
pnpm dlx shadcn@latest add @davinciui/tabsUsage#
Composition#
Use the following composition to build a Tabs:
Tabs
├── TabsList
│ └── TabsTrigger
└── TabsContentAPI Reference#
| Prop | Type | Default |
|---|---|---|
TabsRoot container. | Component | — |
TabsListContainer for triggers. | Component | — |
TabsTriggerButton that activates content. | Component | — |
TabsContentContent for each tab. | Component | — |
variantTrigger variant (TabsTrigger). | "default" | "line" | "default" |
orientationOrientation of tabs. | "horizontal" | "vertical" | "horizontal" |
disabledDisables the trigger. | boolean | false |
classNameAdditional CSS classes. | string | — |
Accessibility#
Triggers are plain buttons with no tablist, tab, tabpanel, aria-selected, or arrow-key navigation. Keyboard users tab through each trigger, activate with Enter or Space, and only the active TabsContent is rendered.
Motion#
Triggers animate background, text, shadow, and border color through transition-all; TabsContent swaps instantly and there is no panel animation. No timing props or prefers-reduced-motion handling are present.
Customization#
Tabs renders hooks for the root, list, trigger, and content. Restyle those slots globally or pass className to the individual parts.
Styling slots
[data-slot="tabs"][data-slot="tabs-list"][data-slot="tabs-trigger"][data-slot="tabs-content"]View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

