Ballmac UI home

Animated Tabs

Radix Tabs with a pill or underline indicator that slides between triggers on a spring, and panels that fade in. Keeps full keyboard support and ARIA; controlled or uncontrolled.

Requests, last 12 hours

1.28M

Installation

$ pnpm dlx shadcn@latest add @ballmac/animated-tabs

Usage

import { AnimatedTabs, AnimatedTabsList, AnimatedTabsTrigger, AnimatedTabsContent } from "@/components/ballmac/animated-tabs"

The full example is in the Code tab above.

Examples

Underline

Your name, email and the avatar teammates see.

API reference

PropTypeDefault
variant

Indicator style: a sliding pill behind the label, or a sliding underline.

AnimatedTabsVariant"pill"

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Left / RightMoves focus between tabs and selects them
Home / EndJumps to the first or last tab
TabMoves from the tab list into the selected panel

Use with AI

Same API as Radix Tabs: <AnimatedTabs defaultValue variant="pill" | "underline"> with AnimatedTabsList, AnimatedTabsTrigger value and AnimatedTabsContent value. The indicator is a Motion layoutId element inside the active trigger. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Animated Tabs (@ballmac/animated-tabs) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Switching between views of the same object (overview, activity, settings)
  • Settings pages with a few sections
  • Pricing toggles such as monthly and yearly

Not for

  • Page-level navigation between routes (use links)
  • More than about six options (use a select)
  • Package-manager command tabs (use install-tabs)

Registry JSON: https://ui.ballmac.com/r/animated-tabs.json

Credits

Free to use in personal and commercial projects.