Breadcrumbs

Show where a page sits in the site.

Source

Basic

Use this on a deep page, such as a docs or handbook page, to show where it sits. Use links for parent pages and Page for the current page.

Collapsed middle

Open the ellipsis menu to reach the hidden parent pages.

Long labels

In a narrow container, labels truncate with an ellipsis. This one is 384px wide.

Usage

These are defaults, not laws. Break one when you have a good reason, or when it makes the design more cohesive or more interesting.

  • End the trail with Breadcrumbs.Page for the current page, not a link.
  • maxItems folds the middle items into a menu. Keep each folded item a Breadcrumbs.Link directly inside its Item, so it still works from the menu.

API

Breadcrumbs is a site component. Its collapsed trail uses the library Menu component.

Breadcrumbs.Root

PropTypeDefaultDescription
maxItemsnumber–Limits visible items, including the menu trigger. The minimum is 3.
aria-labelstring'Breadcrumb'Names the navigation region.
classNamestring–Adds classes to the navigation element.

Breadcrumbs.Item

PropTypeDefaultDescription
childrenReactNode–A Link, Page, or native action button.
classNamestring–Adds classes to the list item.

Breadcrumbs.Link

PropTypeDefaultDescription
tostring–The parent page path or URL. Required.
stateobject–Passes state to site navigation.
onClickfunction–Runs when the link activates.
contextMenubooleanfalseEnables the site link context menu on visible links.
classNamestring–Adds classes to the link.

Breadcrumbs.Separator

PropTypeDefaultDescription
childrenReactNodeIconChevronRightReplaces the separator icon.

Breadcrumbs.Page

PropTypeDefaultDescription
childrenReactNode–The current page label.
classNamestring–Adds classes to the current page label.