{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "animated-tab",
  "type": "registry:ui",
  "title": "Animated Tab",
  "description": "A set of animated navigation tabs with smooth sliding pill highlight.",
  "dependencies": [
    "react",
    "motion"
  ],
  "devDependencies": [
    "@types/react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "ui/animated-tab.tsx",
      "content": "'use client';\n\nimport React, { useState } from 'react';\nimport { motion } from 'motion/react';\nimport { cn } from '@/lib/utils';\n\nexport interface Tab {\n  id: string;\n  label: string;\n}\n\ninterface AnimatedTabsProps {\n  tabs: Tab[];\n  activeTab: string;\n  onChange: (id: string) => void;\n  className?: string;\n}\n\nexport const AnimatedTabs: React.FC<AnimatedTabsProps> = ({\n  tabs,\n  activeTab,\n  onChange,\n  className,\n}) => {\n  const [hoveredTab, setHoveredTab] = useState<string | null>(null);\n\n  return (\n    <div\n      className={cn(\n        'flex flex-row flex-nowrap items-center justify-center gap-1 rounded-full p-1 sm:gap-0 sm:p-1.5',\n        'bg-white/60 dark:bg-zinc-900/60', // Light/Dark glass effect\n        'border border-black/5 dark:border-white/10', // Border adaptation\n        'backdrop-blur-xl', // Strong glass effect\n        'shadow-2xl', // Container shadow\n        'max-w-full', // Ensure it doesn't overflow\n        className\n      )}\n    >\n      {tabs.map((tab) => {\n        const isActive = activeTab === tab.id;\n        const isHovered = hoveredTab === tab.id;\n\n        return (\n          <motion.button\n            key={tab.id}\n            onClick={() => {\n              onChange(tab.id);\n              setHoveredTab(null);\n            }}\n            onMouseEnter={() => setHoveredTab(tab.id)}\n            onMouseLeave={() => setHoveredTab(null)}\n            onTouchStart={() => setHoveredTab(null)}\n            whileTap={{ scale: 0.95 }}\n            className={cn(\n              'relative z-10 cursor-pointer rounded-full px-3 py-2 text-xs font-semibold whitespace-nowrap transition-colors duration-200 outline-none sm:px-4 sm:py-2.5 sm:text-sm md:px-6',\n              isActive\n                ? 'text-white dark:text-black' // Active text\n                : 'text-zinc-600 hover:text-zinc-900 dark:text-zinc-500 dark:hover:text-zinc-300' // Inactive text\n            )}\n            style={{\n              WebkitTapHighlightColor: 'transparent',\n            }}\n          >\n            {/* Active Pill with \"Transferring\" Shadow */}\n            {isActive && (\n              <motion.div\n                layoutId=\"active-pill\"\n                className=\"absolute inset-0 z-[-1] rounded-full bg-black shadow-xl dark:bg-white dark:shadow-[0_0_20px_rgba(255,255,255,0.3)]\"\n                transition={{\n                  type: 'spring',\n                  stiffness: 320,\n                  damping: 32,\n                  mass: 0.9,\n                }}\n              />\n            )}\n\n            {/* Hover Background - Subtle highlight */}\n            {isHovered && !isActive && (\n              <motion.div\n                layoutId=\"hover-pill\"\n                className=\"absolute inset-0 z-[-1] rounded-full bg-black/5 dark:bg-white/5\"\n                initial={{ opacity: 0 }}\n                animate={{ opacity: 1 }}\n                exit={{ opacity: 0 }}\n                transition={{ duration: 0.15 }}\n              />\n            )}\n\n            <span className=\"relative z-10\">{tab.label}</span>\n          </motion.button>\n        );\n      })}\n    </div>\n  );\n};\n\nexport default AnimatedTabs;\n",
      "type": "registry:ui"
    }
  ]
}