Build UI

Animated Tabs

Navigation 94

About

An animated tab component built with Framer Motion's layoutId prop.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Animated Tabs to your project and fits it to your theme.

Code

How Animated Tabs is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { AnimatedTabs } from "@/components/ui/animated-tabs";

const tabs = [
  { id: "world", label: "World" },
  { id: "ny", label: "N.Y." },
  { id: "business", label: "Business" },
  { id: "arts", label: "Arts" },
  { id: "science", label: "Science" },
];

function TabsDemo() {
  return (
    <div className="flex min-h-[100px] w-full items-center justify-center p-4">
      <AnimatedTabs 
        tabs={tabs}
        onChange={(tabId) => console.log("Tab changed:", tabId)} 
      />
    </div>
  );
}

export default { TabsDemo };

Dependencies

More by Build UI

View all
  • Filesystem Item

    Filesystem Item

    599
  • Animated Text

    Animated Text

    220
  • Animated Counter

    Animated Counter

    83
  • Slider

    Slider

    59
  • iOS Animated Switch

    iOS Animated Switch

    6

More in Navigation

View all
  • Sidebar

    Sidebar

    387
  • Footer with Big Wordmark

    Footer with Big Wordmark

    11
  • Navbar

    Navbar

    10
  • Astryx Breadcrumb Item

    Astryx Breadcrumb Item

    2
  • Pagination

    Pagination

    106
  • Stacked Circular Footer

    Stacked Circular Footer

    453
  • Capsule Tabs

    Capsule Tabs

    23
  • Numberless Pagination with Text

    Numberless Pagination with Text

    12