Eduardo Calvo

Animated Tabs

Navigation 62

About

Animated tabs component with a smooth sliding indicator, offering underline, pill, and segment variants with icon support and full keyboard navigation.

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";
import { useState } from "react";

const tabs = [
  { id: "home", label: "Home" },
  { id: "profile", label: "Profile" },
  { id: "settings", label: "Settings" },
];

export default function AnimatedTabsDemo() {
  const [activeTab, setActiveTab] = useState("home");

  return (
    <div className="flex flex-col items-center gap-8">
      <AnimatedTabs
        activeTab={activeTab}
        layoutId="underline-demo"
        onChange={setActiveTab}
        tabs={tabs}
        variant="underline"
      />

      <AnimatedTabs
        activeTab={activeTab}
        layoutId="pill-demo"
        onChange={setActiveTab}
        tabs={tabs}
        variant="pill"
      />

      <AnimatedTabs
        activeTab={activeTab}
        layoutId="segment-demo"
        onChange={setActiveTab}
        tabs={tabs}
        variant="segment"
      />
    </div>
  );
}

Dependencies

More by Eduardo Calvo

View all
  • Scrollable Card Stack

    Scrollable Card Stack

    302
  • Pixel Flow Field

    Pixel Flow Field

    224
  • Siri Orb

    Siri Orb

    205
  • AI Task List

    AI Task List

    204
  • Gravity Stars

    Gravity Stars

    186
  • Cursor Follow

    Cursor Follow

    164
  • Agent Avatar

    Agent Avatar

    162
  • Coverflow Carousel

    Coverflow Carousel

    161

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    179
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    457
  • Meniscus — Liquid Bottom Navigation Bar

    Meniscus — Liquid Bottom Navigation Bar

    40
  • Sidebar

    Sidebar

    445
  • Tabs

    Tabs

    38
  • Stacked Circular Footer

    Stacked Circular Footer

    471
  • Footer

    Footer

    470
  • Sidebar

    Sidebar

    367

Explore more

Part of SmoothUI — browse the full library on 21st.dev.