{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "breadcrumb",
  "type": "registry:ui",
  "title": "Breadcrumb",
  "description": "Breadcrumb is an ordered hierarchical trail showing location with navigable ancestors and a current-page indicator.",
  "author": "Skrewww",
  "dependencies": [
    "@phosphor-icons/react"
  ],
  "registryDependencies": [
    "@skrewww/link",
    "@skrewww/foundation"
  ],
  "docs": "Host requirements (assumed already present, not installed by this command): react, react-dom.",
  "files": [
    {
      "path": "components/ui/Breadcrumb.tsx",
      "content": "/** @skrewww-component breadcrumb */\nimport { House } from \"@phosphor-icons/react/dist/ssr\";\nimport { Link } from \"@/components/ui/Link\";\nimport { cn } from \"@/lib/cn\";\nimport styles from \"@/components/ui/breadcrumb.module.css\";\n\nexport type BreadcrumbItem = {\n  label: string;\n  href?: string;\n  home?: boolean;\n};\n\nexport type BreadcrumbProps = {\n  items: BreadcrumbItem[];\n  className?: string;\n  separator?: string;\n  homeLabel?: string;\n};\n\nfunction HomeIcon() {\n  return <House className={styles.homeIcon} aria-hidden=\"true\" />;\n}\n\nexport function Breadcrumb({\n  items,\n  className,\n  separator = \"/\",\n  homeLabel = \"Home\",\n}: BreadcrumbProps) {\n  return (\n    <nav aria-label=\"Breadcrumb\" className={cn(styles.root, className)}>\n      <ol className={styles.list}>\n        {items.map((item, index) => {\n          const isLast = index === items.length - 1;\n\n          return (\n            <li key={`${item.label}-${index}`} className={styles.item}>\n              {index > 0 ? (\n                <span className={styles.separator} aria-hidden=\"true\">\n                  {separator}\n                </span>\n              ) : null}\n              {isLast ? (\n                item.home ? (\n                  <span className={cn(styles.current, styles.homeCrumb)} aria-current=\"page\">\n                    <HomeIcon />\n                    {item.label || homeLabel}\n                  </span>\n                ) : (\n                  <span className={styles.current} aria-current=\"page\">\n                    {item.label}\n                  </span>\n                )\n              ) : item.href ? (\n                item.home ? (\n                  <Link\n                    href={item.href}\n                    variant=\"subtle\"\n                    size=\"sm\"\n                    className={styles.link}\n                    leadingIcon={<HomeIcon />}\n                  >\n                    {item.label ? item.label : <span className=\"sr-only\">{homeLabel}</span>}\n                  </Link>\n                ) : (\n                  <Link href={item.href} variant=\"subtle\" size=\"sm\" className={styles.link}>\n                    {item.label}\n                  </Link>\n                )\n              ) : item.home ? (\n                <span className={cn(styles.current, styles.homeCrumb)}>\n                  <HomeIcon />\n                  {item.label || homeLabel}\n                </span>\n              ) : (\n                <span className={styles.current}>{item.label}</span>\n              )}\n            </li>\n          );\n        })}\n      </ol>\n    </nav>\n  );\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/Breadcrumb.tsx"
    },
    {
      "path": "components/ui/breadcrumb.module.css",
      "content": ".root {\n  width: 100%;\n}\n\n.list {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  gap: var(--breadcrumb-gap);\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n\n.item {\n  display: inline-flex;\n  align-items: center;\n  gap: var(--breadcrumb-gap);\n  max-width: 100%;\n}\n\n.separator {\n  color: var(--breadcrumb-separator);\n  user-select: none;\n}\n\n.link {\n  max-width: var(--breadcrumb-max-item-width);\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  /* Figma Navigation/Breadcrumb Item Default 2024:2860 binds\n     component/surface/content-muted, not semantic/text/secondary.\n     Hover/Current stay on semantic/text/primary via Link subtle states. */\n  color: var(--component-surface-content-muted);\n}\n\n.current {\n  color: var(--breadcrumb-current-text);\n  font-size: var(--breadcrumb-font-size);\n  font-weight: 500;\n  max-width: var(--breadcrumb-max-item-width);\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.homeIcon {\n  width: var(--breadcrumb-icon-size);\n  height: var(--breadcrumb-icon-size);\n  flex-shrink: 0;\n}\n\n.homeCrumb {\n  display: inline-flex;\n  align-items: center;\n  gap: var(--breadcrumb-gap);\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/breadcrumb.module.css"
    },
    {
      "path": "lib/cn.ts",
      "content": "export function cn(...classes: Array<string | false | null | undefined>): string {\n  return classes.filter(Boolean).join(\" \");\n}\n",
      "type": "registry:lib",
      "target": "~/lib/cn.ts"
    }
  ]
}
