Skip to main content

molecules

Breadcrumbs

The path from a root page down to the current one. The last item is the current page, as text.

Specimens

Three levels
{{ Breadcrumbs.render({
  trail: [
    { url: "/docs/", title: "Docs" },
    { url: "/docs/design/", title: "Design" },
    { url: "/docs/design/molecules/", title: "Molecules" }
  ]
}) }}
Two levels
{{ Breadcrumbs.render({
  label: "Short trail",
  trail: [
    { url: "/docs/", title: "Docs" },
    { url: "/docs/design/", title: "Design" }
  ]
}) }}

Params

ParamTypeRequiredDescription
trail{ url, title }[]YesRoot first, current page last. Fewer than two items renders nothing.
labelstringNoThe <nav>'s aria-label. Defaults to “Breadcrumb”; must differ from other navs on the page.
classesstring | variant map | arrayNoAppended 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.