Skip to content

Path Controls

Breadcrumb renders a labeled trail of links that shows the user where the current page sits in the hierarchy and lets them step back up it. It is fully composable: you supply the items, the separators, and the page that is currently active. Long trails can be collapsed with an ellipsis.

Live demo

The interactive story below runs from the deployed Storybook.

Usage

Source: breadcrumb.tsx

import {
Breadcrumb,
BreadcrumbEllipsis,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from "@beacon/design-system";
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink href="/">Home</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbEllipsis />
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbLink href="/projects">Projects</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>Current Page</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>

Parts

PartRole
BreadcrumbRoot nav landmark with aria-label="breadcrumb". Accepts an optional separator node.
BreadcrumbListThe ordered list (ol) that holds the trail.
BreadcrumbItemA single li wrapper around a link or the current page.
BreadcrumbLinkAn a for an ancestor level. Pass asChild to render your own router link instead.
BreadcrumbPageThe current page: non-interactive, with aria-current="page". Use this for the last item.
BreadcrumbSeparatorThe divider between items. Defaults to a chevron; pass children to override it.
BreadcrumbEllipsisA collapsed-range marker for hiding intermediate levels in a long trail.
PropTypeDefaultDescription
asChildbooleanfalseRender the styling onto a child element (for example a framework Link) instead of an a.
hrefstringn/aStandard anchor target. All other native a attributes pass through.

When to use

  • Detail pages nested several levels deep (for example a notice inside a project inside a tenant).
  • Any view where the user benefits from seeing and clicking back up the hierarchy.
  • As secondary orientation alongside the primary nav, not as a replacement for it.

Do not use a breadcrumb as the main way to move between top-level areas; that belongs to the sidebar nav.