← All Components
<mth-breadcrumb-path>
Data-driven breadcrumb path trail with safe-href links, middle-segment ellipsis collapsing, and responsive overflow handling.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-breadcrumb-path>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/breadcrumb-path"></script>
<mth-breadcrumb-path max-items="0" separator="/"></mth-breadcrumb-path>import '@methane-ui/ui/breadcrumb-path';
import '@methane-ui/react';
export function Example() {
return <mth-breadcrumb-path max-items="0" separator="/"></mth-breadcrumb-path>;
}<script setup lang="ts">
import '@methane-ui/ui/breadcrumb-path';
</script>
<template>
<mth-breadcrumb-path max-items="0" separator="/"></mth-breadcrumb-path>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/breadcrumb-path';
import { MthBreadcrumbPathDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthBreadcrumbPathDirective],
template: `<mth-breadcrumb-path max-items="0" separator="/"></mth-breadcrumb-path>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/breadcrumb-path';
import MthBreadcrumbPath from '@methane-ui/svelte/MthBreadcrumbPath.svelte';
</script>
<MthBreadcrumbPath max-items="0" separator="/"></MthBreadcrumbPath>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
maxItems | max-items | number | 0 | Maximum visible items before collapsing middle segments (0 shows all items unless overflowing). |
separator | separator | string | "/" | Visual separator glyph between path segments. |
label | label | string | "" | Accessible landmark aria-label for <nav>. |
expanded | expanded | boolean | false | Reveals all collapsed middle items when set. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-navigate | { item: unknown; index: number } | Cancelable event fired when a breadcrumb link is clicked. |
mth-expand | { expanded: true } | Fired when the collapsed ellipsis button is activated. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| Enter | both | Ellipsis expand button is focused | Expands collapsed middle breadcrumb segments |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 1 APG keyboard transitions across LTR/RTL. | mth-breadcrumb-path.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(collapsed). | Conformance suite |
| i18n | Routes 2 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |