{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "animated-breadcrumb",
  "type": "registry:ui",
  "title": "Animated Breadcrumb",
  "dependencies": [
    "motion",
    "lucide-react"
  ],
  "files": [
    {
      "path": "components/ui/animated-breadcrumb.tsx",
      "content": "\"use client\";\n\nimport React, { useState } from \"react\";\nimport { motion, AnimatePresence } from \"motion/react\";\nimport { ChevronRight, Folder, MoreHorizontal } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Crumb {\n  label: string;\n  href?: string;\n}\n\nconst DEFAULT_CRUMBS: Crumb[] = [\n  { label: \"Workspace\" },\n  { label: \"Design System\" },\n  { label: \"Motion Primitives\" },\n  { label: \"Breadcrumbs\" },\n];\n\nexport function AnimatedBreadcrumb({\n  items = DEFAULT_CRUMBS,\n  className,\n}: {\n  items?: Crumb[];\n  className?: string;\n}) {\n  const [expanded, setExpanded] = useState(false);\n\n  const visibleItems =\n    items.length > 3 && !expanded\n      ? [items[0], { label: \"...\" }, items[items.length - 1]]\n      : items;\n\n  return (\n    <nav\n      aria-label=\"Breadcrumb\"\n      className={cn(\n        \"inline-flex items-center gap-1 rounded-xl border border-white/10 bg-zinc-900/80 px-3 py-2 text-sm backdrop-blur-md\",\n        className\n      )}\n    >\n      <Folder className=\"mr-1 h-3.5 w-3.5 text-zinc-400\" />\n      <AnimatePresence mode=\"popLayout\" initial={false}>\n        {visibleItems.map((item, idx) => {\n          const isEllipsis = item.label === \"...\";\n          const isLast = idx === visibleItems.length - 1;\n\n          return (\n            <motion.div\n              key={`${item.label}-${idx}`}\n              layout\n              initial={{ opacity: 0, scale: 0.9, x: -6 }}\n              animate={{ opacity: 1, scale: 1, x: 0 }}\n              exit={{ opacity: 0, scale: 0.9 }}\n              transition={{ type: \"spring\", stiffness: 400, damping: 28 }}\n              className=\"flex items-center gap-1\"\n            >\n              {idx > 0 && (\n                <ChevronRight className=\"h-3.5 w-3.5 text-zinc-600\" />\n              )}\n              {isEllipsis ? (\n                <button\n                  onClick={() => setExpanded(true)}\n                  title=\"Expand path\"\n                  className=\"flex h-6 w-6 items-center justify-center rounded-md text-zinc-400 hover:bg-white/10 hover:text-zinc-100 cursor-pointer transition-colors\"\n                >\n                  <MoreHorizontal className=\"h-3.5 w-3.5\" />\n                </button>\n              ) : (\n                <button\n                  onClick={() => isLast && items.length > 3 && setExpanded(false)}\n                  className={cn(\n                    \"rounded-md px-2 py-0.5 transition-colors cursor-pointer\",\n                    isLast\n                      ? \"bg-white/10 font-medium text-zinc-100\"\n                      : \"text-zinc-400 hover:bg-white/5 hover:text-zinc-200\"\n                  )}\n                >\n                  {item.label}\n                </button>\n              )}\n            </motion.div>\n          );\n        })}\n      </AnimatePresence>\n    </nav>\n  );\n}\n\n",
      "type": "registry:ui"
    }
  ]
}