ki-breadcrumb
@kimen/elements/ki-breadcrumb- Source
- Agent reference
Use ki-breadcrumb to show how the current page fits into a workspace, app,
or documentation hierarchy. Add one direct ki-breadcrumb-item for each
level, from the root to the page the reader is on.
<ki-breadcrumb label="Project path"><ki-breadcrumb-item href="#workspace">Workspace</ki-breadcrumb-item><ki-breadcrumb-item href="#projects">Projects</ki-breadcrumb-item><ki-breadcrumb-item current>Settings</ki-breadcrumb-item></ki-breadcrumb>Each item’s text supplies its label. Ancestors with an href are links. The
last item appears as text and is announced as the current page, with or
without the explicit current marker.
Long paths
Set max-items="4" to collapse a long path. When the path exceeds the
threshold, the first and last two levels stay visible and the middle
levels appear in the ellipsis menu. A positive limit below four uses four.
<ki-breadcrumb label="Release path" max-items="4"><ki-breadcrumb-item href="#workspace">Workspace</ki-breadcrumb-item><ki-breadcrumb-item href="#projects">Projects</ki-breadcrumb-item><ki-breadcrumb-item href="#kimen">Kimen</ki-breadcrumb-item><ki-breadcrumb-item href="#packages">Packages</ki-breadcrumb-item><ki-breadcrumb-item href="#releases">Releases</ki-breadcrumb-item><ki-breadcrumb-item current>v2.4.0</ki-breadcrumb-item></ki-breadcrumb>Tab reaches the visible links and the ellipsis button. Enter, Space and Down open the menu at its first level. Up opens it at its last level. Move through the menu with the arrow keys, Home and End, or a level’s first character. Escape closes the menu and returns focus to the button.
Localization and density
Set label to name the navigation landmark. Use more-label to localize
the overflow button and put {n} where the hidden level count belongs.
Right-to-left reading order follows the nearest dir setting. Use
data-ki-density="touch" on the breadcrumb or its region for larger targets.
API reference
When to use: show the current page in a deeper hierarchy using direct ki-breadcrumb-item children ordered from root to current.
When not to use: switch between peer routes, toggle peer panels, or display progress through a form.
Properties & attributes
| Attribute | Property | Type | Default | Description |
|---|---|---|---|---|
label | label | string | 'Breadcrumb' | Accessible name of the navigation landmark. |
max-items | maxItems | number | undefined | – | Optional overflow threshold. Above it, keep the first and last two levels visible. Positive values are rounded down and clamped to four. Omit this prop, or pass a non-positive or non-finite value, to show the full trail. |
more-label | moreLabel | string | 'Show {n} more levels' | Localizable name of the overflow control. Use {n} for the hidden level count. |
Slots
| Slot | Description |
|---|---|
| (default) | Direct ki-breadcrumb-item children in hierarchy order. |
CSS parts
| Part | Description |
|---|---|
current | The current page label. |
label | The label of an ancestor with no destination. |
link | A visible native ancestor link. |
list | The ordered list of visible levels. |
list-item | A list entry for a level or the overflow control. |
menu | The anchored menu of collapsed levels. |
menu-item | A destination or unavailable level in the overflow menu. |
more-button | The overflow menu button. |
navigation | The named navigation landmark. |
CSS custom properties
The public styling contract of ki-breadcrumb: reassign these tokens at :root or on a subtree — never override internals.
| Token | Description |
|---|---|
--ki-breadcrumb-bg | Transparent backing for ancestor text and the overflow trigger. |
--ki-breadcrumb-current-bg | Transparent backing for the current level. |
--ki-breadcrumb-current-fg | Emphasized foreground of the current level. |
--ki-breadcrumb-fg | Medium-emphasis ink for ancestors and the overflow trigger, strengthened in more-contrast mode. |
--ki-breadcrumb-gap | Gap between breadcrumb rows, levels and their chevrons. |
--ki-breadcrumb-glyph-size | Size of the ellipsis glyph. |
--ki-breadcrumb-hover-bg | Backing for the active overflow trigger and highlighted overflow links. |
--ki-breadcrumb-hover-fg | Foreground for the active overflow trigger and highlighted overflow links. |
--ki-breadcrumb-menu-backdrop-filter | Complete backdrop filter of the overflow menu, none by default. |
--ki-breadcrumb-menu-bg | Surface behind the overflow menu entries. |
--ki-breadcrumb-menu-bg-image | Optional image layered over the overflow menu surface. |
--ki-breadcrumb-menu-fg | Text of overflow menu entries. |
--ki-breadcrumb-menu-max-block-size | Maximum block size of the scrollable overflow menu. |
--ki-breadcrumb-menu-padding | Inset around the overflow menu entries. |
--ki-breadcrumb-menu-radius | Outer radius of the overflow menu. |
--ki-breadcrumb-menu-shadow | Elevation of the overflow menu above the page. |
--ki-breadcrumb-padding-block | Block inset of a level label. |
--ki-breadcrumb-padding-inline | Inline inset of a level label. |
--ki-breadcrumb-radius | Radius of the overflow trigger and level focus outlines. |
--ki-breadcrumb-separator | Foreground of the decorative breadcrumb chevron. |
--ki-breadcrumb-separator-size | Edge length of the decorative chevron before rotation. |
--ki-breadcrumb-separator-stroke | Stroke width of the decorative chevron. |
--ki-density-target-min | The smallest pointer target any density may produce: 24 x 24 CSS px by default and in compact (WCAG 2.5.8 AA), 44 x 44 in touch (WCAG 2.5.5). It floors a shrinking control but never lifts what a control paints: a control painted smaller extends its target to it, invisibly; rows and tabs grow to it (spec 045 A1). |
--ki-focus-ring-color | Colour of the keyboard focus ring every focusable component draws: 3:1 or more against the page in every theme and scheme. |
--ki-focus-ring-offset | Gap between a focusable component and its keyboard focus ring. |
--ki-focus-ring-width | Thickness of the keyboard focus ring every focusable component draws (its outline). One token instead of one per component, so a mode or a theme changes every ring at once. |
--ki-typography-family-body | semantic font family for typography family body. |
--ki-typography-line-height-body-1 | semantic dimension for typography line height body 1. |
--ki-typography-size-body-1 | semantic dimension for typography size body 1. |
--ki-typography-underline-offset | Gap between text and its underline. |
--ki-typography-weight-body-medium | semantic font weight for typography weight body medium. |