Skip to content

    Browse components

    Animated Tabs

    Tab bar with a springy shared-layout indicator and panels that slide and blur in the direction of travel.

    Open
    Customize
    pill
    underline
    slide
    fade

    Installation

    npx shadcn@latest add @glint-ui/animated-tabs

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/animated-tabs.json

    Usage

    import { AnimatedTabs } from "@/components/ui/animated-tabs";
    
    <AnimatedTabs
      tabs={[
        { id: "overview", label: "Overview", content: <Overview /> },
        { id: "analytics", label: "Analytics", content: <Analytics /> },
      ]}
    />

    Props

    PropTypeDefaultDescription
    tabsReactNode—Array of { id, label, icon?, content }.
    variant"pill" | "underline""pill"Indicator style.
    transition"slide" | "fade""slide"Panel enter/exit style.
    bouncenumber0.2Spring bounce of the indicator.
    defaultTabstring—Id of the initially selected tab.
    onChangeReactNode—Called with the new tab id.
    classNamestring—Extra classes for the root element.