Animated Tabs
Tab bar with a sliding pill that morphs between active tabs using layout animation.
npx uniqueui add animated-tabs
Preview
Build stunning interfaces with our design system. Every component is crafted with attention to detail.
Usage
import { AnimatedTabs } from "@/components/ui/animated-tabs";
export default function Example() {
return (
<div className="max-w-md mx-auto p-10">
<AnimatedTabs
tabs={[
{
id: "design",
label: "Design",
content: (
<div className="p-4 rounded-lg bg-neutral-900/50 border border-neutral-800 text-neutral-300 text-sm">
Build stunning interfaces with our design system. Every component is crafted with
attention to detail.
</div>
),
},
{
id: "animate",
label: "Animate",
content: (
<div className="p-4 rounded-lg bg-neutral-900/50 border border-neutral-800 text-neutral-300 text-sm">
Add life to your UI with spring-physics animations powered by Motion.dev.
</div>
),
},
{
id: "ship",
label: "Ship",
content: (
<div className="p-4 rounded-lg bg-neutral-900/50 border border-neutral-800 text-neutral-300 text-sm">
Deploy with confidence. All components are production-ready and accessible.
</div>
),
},
]}
/>
</div>
);
}Props
| Prop | Type | Description |
|---|---|---|
tabs | { | Array of tab configurations establishing navigation schema. |
id | string | A unique identifier used strictly for layout animations. |
label | string | The string/node rendered on the clickable tab button. |
content | React.ReactNode | The DOM payload rendered below when this tab is selected. |
className | string | Description coming soon |
tabClassName | string | Description coming soon |
activeTabClassName | string | Description coming soon |
contentClassName | string | Description coming soon |
onChange | (id: string) => void | Description coming soon |