Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-breadcrumb-path>

@methane-ui/ui~7.9 KB brotli (cold + Lit)~2.0 KB marginal

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

Interactive StageLive Custom Element · <mth-breadcrumb-path> (@methane-ui/ui)
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>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
maxItemsmax-itemsnumber0Maximum visible items before collapsing middle segments (0 shows all items unless overflowing).
separatorseparatorstring"/"Visual separator glyph between path segments.
labellabelstring""Accessible landmark aria-label for <nav>.
expandedexpandedbooleanfalseReveals all collapsed middle items when set.

Events

EventDetail TypeDescription
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

KeyDirectionWhenExpected Behavior
EnterbothEllipsis expand button is focusedExpands collapsed middle breadcrumb segments

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 1 APG keyboard transitions across LTR/RTL.mth-breadcrumb-path.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(collapsed).Conformance suite
i18nRoutes 2 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test