Primitives
Help users understand their location within a hierarchy with a fully accessible breadcrumb trail.
Import the Breadcrumb primitives from ng-primitives/breadcrumbs.
import {
NgpBreadcrumbs,
NgpBreadcrumbList,
NgpBreadcrumbItem,
NgpBreadcrumbLink,
NgpBreadcrumbSeparator,
NgpBreadcrumbEllipsis,
NgpBreadcrumbPage,
} from 'ng-primitives/breadcrumbs';
Assemble the directives to build the breadcrumb structure, applying your own aria-label to describe the navigation context. You can optionally wire the ellipsis into the Menu primitives to expose collapsed sections.
<nav aria-label="Breadcrumb" ngpBreadcrumbs>
<ol ngpBreadcrumbList>
<li ngpBreadcrumbItem>
<a ngpBreadcrumbLink href="/">Home</a>
</li>
<li ngpBreadcrumbSeparator>/</li>
<li ngpBreadcrumbItem>
<button type="button" aria-label="Toggle breadcrumb menu">
<span ngpBreadcrumbEllipsis>...</span>
</button>
</li>
<li ngpBreadcrumbSeparator>/</li>
<li ngpBreadcrumbItem>
<a ngpBreadcrumbLink href="...">Components</a>
</li>
<li ngpBreadcrumbSeparator>/</li>
<li ngpBreadcrumbItem>
<span ngpBreadcrumbPage>Breadcrumbs</span>
</li>
</ol>
</nav>
The following directives are available to import from the ng-primitives/breadcrumbs package:
| Attribute | Description |
|---|---|
data-hover |
Applied when the breadcrumb link is hovered. |
data-press |
Applied when the breadcrumb link is pressed. |
data-focus-visible |
Applied when the link receives focus visibly. |
data-current |
Applied when the link represents the page. |
| Attribute | Description |
|---|---|
data-current |
Applied to indicate the current location. |
Adheres to the WAI-ARIA Breadcrumb Pattern.
nav landmark with an accessible label.role="presentation" and aria-hidden.aria-current="page" for accurate announcements.Copyright © 2026 Angular Primitives
This site is powered by Netlify