Components
Animated Tabs
A tab component with a moving active pill and directional content transitions.
interactivemotionanimationtabsaccessibility
Installation
$npx shadcn@latest add https://ui.navdeepsingh.dev/r/animated-tabs.jsonAPI Reference
| Prop | Type | Default | Description |
|---|---|---|---|
items | AnimatedTabItem[] | - | Tabs to render. Each item is { value, label, content }, where content is any React node. |
defaultValue | string | - | value of the tab selected on first render. Defaults to the first tab. |
className | string | - | Classes merged onto the outer wrapper. |
listClassName | string | - | Classes merged onto the tab list (the pill track). |
triggerClassName | string | - | Classes merged onto each tab trigger button. |
contentClassName | string | - | Classes merged onto the content panel wrapper. |
Customization
- Pass
classNameto restyle the component. Classes are merged withcn, so your utilities win. - Styling uses Tailwind utility classes and theme tokens, so it adapts to light/dark mode automatically.
- Tune behavior with the props in the API reference above, for example
items.