UniqueUI

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

PropTypeDescription
tabs{Array of tab configurations establishing navigation schema.
idstringA unique identifier used strictly for layout animations.
labelstringThe string/node rendered on the clickable tab button.
contentReact.ReactNodeThe DOM payload rendered below when this tab is selected.
classNamestringDescription coming soon
tabClassNamestringDescription coming soon
activeTabClassNamestringDescription coming soon
contentClassNamestringDescription coming soon
onChange(id: string) => voidDescription coming soon