Skip to main content

Breadcrumbs

Breadcrumbs display a secondary navigation trail that helps users understand their current location within a hierarchy.

Also known as: Breadcrumb trail, Secondary navigation
Salt package@salt-ds/core

Use the default composition for a concise trail with linked levels.

The current level carries aria-current="page". By default the current level is the final Breadcrumb, but set current on a child to declare it explicitly when the current level is not the last item.

Compose BreadcrumbTrigger and BreadcrumbLabel as children to add a tooltip to a breadcrumb. BreadcrumbLabel provides the visible and accessible label, and BreadcrumbTrigger is required for href to render the item as a link.

When the content exceeds the available width, breadcrumbs can wrap onto subsequent lines. The breadcrumb and its separator should be on the same line.

Set wrap to allow the trail to wrap onto subsequent lines.

Breadcrumbs can be collapsed to save space or hide lower priority levels (e.g. only displaying Home and the current level). Hidden levels are revealed in an overflow disclosure, and the order of the menu items matches the hierarchy of the levels.

Set maxItems to collapse lower priority levels into the disclosure.

Use render to adapt breadcrumb links to a routing library such as React Router or Next.js. The same renderer is used for visible links and links inside the collapsed disclosure. See the render prop guide for the supported render forms.