Installation
Included in the starter. Every new site has it in src/components/ui/breadcrumbs/. Import it where you need it, or register it in src/components.ts to use it on every page. If your site predates it, install it:
npx @cloudflare/nimbus-docs add breadcrumbsyarn nimbus-docs add breadcrumbspnpm nimbus-docs add breadcrumbsbunx @cloudflare/nimbus-docs add breadcrumbsPreview
<Breadcrumbs
items={[
{ label: "Home", href: "/" },
{ label: "Components", href: "/components" },
{ label: "Breadcrumbs", href: "/components/breadcrumbs" },
]}
/>Examples
Long path
Past maxVisible, middle entries collapse to an ellipsis.
<Breadcrumbs
maxVisible={3}
items={[
{ label: "Docs", href: "/" },
{ label: "API reference", href: "/api-reference" },
{ label: "OpenAPI", href: "/api-reference/openapi" },
{ label: "Setup", href: "/api-reference/openapi/setup" },
{ label: "Install with the recipe", href: "/api-reference/openapi/setup#install-with-the-recipe" },
]}
/>API reference
Every prop the component accepts, sourced from a single declaration.
| Prop | Type |
|---|---|
itemsrequired | Array<{ label: string; href: string }> |
maxVisible | number |