{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "animated-tabs",
  "type": "registry:ui",
  "title": "Animated Tabs",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "components/ui/animated-tabs.tsx",
      "content": "\"use client\";\n\nimport React, { useState } from \"react\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface TabItem {\n  id: string;\n  label: string;\n  badge?: string;\n}\n\nconst DEFAULT_TABS: TabItem[] = [\n  { id: \"overview\", label: \"Overview\" },\n  { id: \"components\", label: \"Components\", badge: \"13\" },\n  { id: \"templates\", label: \"Templates\" },\n  { id: \"pricing\", label: \"Pro\" },\n];\n\ninterface AnimatedTabsProps {\n  tabs?: TabItem[];\n  defaultTab?: string;\n  onChange?: (id: string) => void;\n  className?: string;\n}\n\nexport function AnimatedTabs({\n  tabs = DEFAULT_TABS,\n  defaultTab = tabs[0]?.id,\n  onChange,\n  className,\n}: AnimatedTabsProps) {\n  const [activeTab, setActiveTab] = useState(defaultTab);\n\n  const handleSelect = (id: string) => {\n    setActiveTab(id);\n    onChange?.(id);\n  };\n\n  return (\n    <div\n      className={cn(\n        \"inline-flex items-center gap-1 rounded-full border border-white/10 bg-zinc-900/90 p-1 backdrop-blur-md\",\n        className\n      )}\n      role=\"tablist\"\n    >\n      {tabs.map((tab) => {\n        const isActive = activeTab === tab.id;\n        return (\n          <button\n            key={tab.id}\n            role=\"tab\"\n            aria-selected={isActive}\n            onClick={() => handleSelect(tab.id)}\n            className={cn(\n              \"relative rounded-full px-4 py-1.5 text-sm font-medium transition-colors cursor-pointer select-none\",\n              isActive ? \"text-zinc-950\" : \"text-zinc-400 hover:text-zinc-200\"\n            )}\n          >\n            {isActive && (\n              <motion.span\n                layoutId=\"animated-tabs-pill\"\n                transition={{ type: \"spring\", stiffness: 420, damping: 32 }}\n                className=\"absolute inset-0 rounded-full bg-zinc-50 shadow-sm\"\n              />\n            )}\n            <span className=\"relative z-10 flex items-center gap-1.5\">\n              {tab.label}\n              {tab.badge && (\n                <span\n                  className={cn(\n                    \"rounded-full px-1.5 py-0.5 text-[10px] font-semibold leading-none transition-colors\",\n                    isActive\n                      ? \"bg-zinc-950/10 text-zinc-900\"\n                      : \"bg-white/10 text-zinc-300\"\n                  )}\n                >\n                  {tab.badge}\n                </span>\n              )}\n            </span>\n          </button>\n        );\n      })}\n    </div>\n  );\n}\n\n",
      "type": "registry:ui"
    }
  ]
}