Breadcrumb
A clear path back. Lightweight, semantic location cues.
<div class="breadcrumb">
<div><div><a href="#home">Home</a></div></div>
<div><div><a href="#blocks">Blocks</a></div></div>
<div><div><a href="#current">Current page</a></div></div>
</div>.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 12px; color: var(--muted-foreground); }
.breadcrumb > div { display: flex; gap: 0.6rem; }
.breadcrumb > div:not(:last-child)::after { content: "/"; }
.breadcrumb [aria-current] { color: var(--foreground); text-decoration: none; }export default function decorate(block) {
const links = [...block.querySelectorAll('a')];
if (links.length) links.at(-1).setAttribute('aria-current', 'page');
block.setAttribute('role', 'navigation');
block.setAttribute('aria-label', 'Breadcrumb');
}Installation
Run the source CLI from a Blocks UI checkout. This package is not published to npm.
node packages/cli/index.js add breadcrumbOr copy the source files above. Include tokens.css and base.css once in your project.
Usage
Use the authored row-and-column structure, then let the standalone runtime discover and enhance the block.
<div class="breadcrumb">
<div><div><a href="#home">Home</a></div></div>
<div><div><a href="#blocks">Blocks</a></div></div>
<div><div><a href="#current">Current page</a></div></div>
</div>import decorate from './blocks/breadcrumb/breadcrumb.js';
document.querySelectorAll('.breadcrumb').forEach(decorate);Variants
Choose a variant in the live preview. Add its class to the authored block.
defaultAccessibility & behavior
Semantic HTML, visible focus states, shared contrast-aware tokens, and responsive styles provide an accessible foundation. Preserve labels and heading hierarchy when customizing.
Multiple instances are supported. Layouts adapt to smaller viewports. No npm dependencies are required at runtime.
AEM usage
Copy the canonical CSS and JavaScript into your EDS block folder. Use the same row-and-column authoring structure shown above and let your existing AEM loader call the default decorator.
Standalone verified. EDS markup compatible. Live AEM integration has not been verified.