Components

Animated Tabs

A tab component with a moving active pill and directional content transitions.

interactivemotionanimationtabsaccessibility

One workspace for everything

Bring docs, tasks, and discussions together so your team always has a single source of truth.

A bright, organized office workspace

Installation

$npx shadcn@latest add /r/animated-tabs.json

API Reference

PropTypeDefaultDescription
itemsAnimatedTabItem[]-Tabs to render. Each item is { value, label, content }, where content is any React node.
defaultValuestring-value of the tab selected on first render. Defaults to the first tab.
classNamestring-Classes merged onto the outer wrapper.
listClassNamestring-Classes merged onto the tab list (the pill track).
triggerClassNamestring-Classes merged onto each tab trigger button.
contentClassNamestring-Classes merged onto the content panel wrapper.

Customization

  • Pass className to restyle the component — classes are merged with cn, 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 (e.g. items).