Skip to main content

Breadcrumb

BasicNavigation<co-breadcrumb>

Breadcrumb shows where a deep screen sits and links back up the path.

import { Breadcrumb } from 'health-components';

Examples​

Examples​

Storybook

Usage​

<Breadcrumb items={[{ label: "Settings", href: "/settings" }, { label: "Roles and Permissions", href: "/settings/roles" }, { label: "Biller" }]} />

When to use​

  • Three or more levels deep in Settings or Reports.

When not to use​

  • Inside the patient chart (the banner already anchors it).

Variants and states​

VariantWhat it is
defaultLinks, chevrons, current page in ink 500.

Accessibility​

  • nav "Breadcrumb", ordered list, aria-current="page" on the last item.

Do and don't​

  • Do: Settings, Roles and Permissions, Biller.
  • Don't: Repeat the page title as a link.

Props​

PropTypeDefaultDescription
items *BreadcrumbItem[]—Path from the top level to the current page. Required.
labelstring"Breadcrumb"Landmark name
onNavigate(item: BreadcrumbItem, event: MouseEvent<HTMLAnchorElement>) => voidnoneCalled when a level is clicked (client-side routing)

Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-breadcrumb>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.

Angular template
<co-breadcrumb label="…" default-checked [items]="items" (co-navigate)="onNavigate($event.detail)"></co-breadcrumb>
KindNameDescription
property / JSON attributeitemsPath from the top level to the current page. Required.
attributelabelLandmark name; default "Breadcrumb"
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-navigateCalled when a level is clicked (client-side routing); default none (React: onNavigate)