Breadcrumb
BasicNavigation
<co-breadcrumb>Breadcrumb shows where a deep screen sits and links back up the path.
import { Breadcrumb } from 'health-components';
Examples
Examples
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
| Variant | What it is |
|---|---|
| default | Links, 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
| Prop | Type | Default | Description |
|---|---|---|---|
items * | BreadcrumbItem[] | — | Path from the top level to the current page. Required. |
label | string | "Breadcrumb" | Landmark name |
onNavigate | (item: BreadcrumbItem, event: MouseEvent<HTMLAnchorElement>) => void | none | Called 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>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | items | Path from the top level to the current page. Required. |
| attribute | label | Landmark name; default "Breadcrumb" |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-navigate | Called when a level is clicked (client-side routing); default none (React: onNavigate) |