molecules
Breadcrumbs
The path from a root page down to the current one. The last item is the current page, as text.
Specimens
{{ Breadcrumbs.render({
trail: [
{ url: "/docs/", title: "Docs" },
{ url: "/docs/design/", title: "Design" },
{ url: "/docs/design/molecules/", title: "Molecules" }
]
}) }}{{ Breadcrumbs.render({
label: "Short trail",
trail: [
{ url: "/docs/", title: "Docs" },
{ url: "/docs/design/", title: "Design" }
]
}) }}Params
| Param | Type | Required | Description |
|---|---|---|---|
trail | { url, title }[] | Yes | Root first, current page last. Fewer than two items renders nothing. |
label | string | No | The <nav>'s aria-label. Defaults to “Breadcrumb”; must differ from other navs on the page. |
classes | string | variant map | array | No | Appended to the <nav>. |
Notes
Build the trail from the navigation tree (the design pages use the navigationTrail filter), then pass it in. Give each breadcrumb on a page a distinct label, since it names the navigation landmark.