{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "breadcrumb",
  "type": "registry:ui",
  "title": "Breadcrumb",
  "description": "The path to the current page as a labelled list of links; the last item is the page itself (aria-current), not a link.",
  "dependencies": [
    "lucide-react@^1.49.0"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/button.json",
    "https://ui.klarhimmel.com/r/theme.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/ui/breadcrumb.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/ui/breadcrumb.tsx",
      "content": "import { Fragment } from 'react';\nimport { ChevronRight } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { safeHref } from './button';\n\nexport interface BreadcrumbItem {\n  label: string;\n  /** Omit on the last item: it is the current page. */\n  href?: string;\n}\n\n/** The path to the current page. The last item is the page itself (aria-current) and is not a link. */\nexport function Breadcrumb({ items, label = 'Breadcrumb', className }: { items: BreadcrumbItem[]; label?: string; className?: string }) {\n  return (\n    <nav aria-label={label} className={className}>\n      <ol className=\"flex flex-wrap items-center gap-x-1 gap-y-0.5 text-kh-small text-kh-muted\">\n        {items.map((it, i) => {\n          const last = i === items.length - 1;\n          return (\n            <Fragment key={`${i}-${it.label}`}>\n              <li className=\"inline-flex min-w-0 items-center\">\n                {last || !it.href ? (\n                  <span aria-current={last ? 'page' : undefined} className={cn('truncate', last && 'font-medium text-kh-ink')}>{it.label}</span>\n                ) : (\n                  <a\n                    href={safeHref(it.href)}\n                    className=\"inline-flex min-h-6 items-center truncate rounded-kh-sm px-0.5 underline-offset-4 hover:text-kh-ink hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-(--kh-focus)\"\n                  >\n                    {it.label}\n                  </a>\n                )}\n              </li>\n              {!last && (\n                <li aria-hidden role=\"presentation\" className=\"inline-flex text-kh-line-strong\">\n                  <ChevronRight className=\"size-3.5\" />\n                </li>\n              )}\n            </Fragment>\n          );\n        })}\n      </ol>\n    </nav>\n  );\n}\n"
    }
  ]
}
