Breadcrumb โ
A wayfinding component for page hierarchies โ pair it with a page header above the title and subtitle. Items render as <a> when they include href, as <button> otherwise; the last item (or any item with current: true) becomes the unclickable current marker. Three variants (default, contained, underlined), six accent colors, six sizes (xsโxxl), optional truncation, and per-item icon slots cover the v1 surface.
Basic โ
Three items separated by โบ. Last item is the current page.
Vue SFC
Variants โ
default / contained / underlined side-by-side, same items.
Vue SFC
Sizes โ
xs / sm / md / lg / xl / xxl โ affects font, padding, and gap.
Vue SFC
Colors โ
Six theme colors plus surface, applied to the current item and hover state.
Vue SFC
With icons โ
Items with leading SVG icons (slot="icon-{id}" for the Lit element).
Vue SFC
Separators โ
Custom separator strings (โบ, /, โข) and a slotted SVG chevron.
Vue SFC
Interactive โ
Clicks emit mno-click; the demo logs each click and prevents anchor navigation.
Vue SFC
Truncation โ
Long path with the truncate flag โ items overflow to ellipsis instead of wrapping.
Vue SFC
Customized โ
Per-element overrides via cssClass (Vue) or extra utility classes (CSS).
Vue SFC
Slot-body composition โ
Wrap with <mono-breadcrumb> for nav semantics + theming, slot a <mono-breadcrumb-list> as the body.
Vue SFC
Standalone list โ
<mono-breadcrumb-list> used directly with no wrapper โ themes itself via modifier attributes.
Vue SFC
CSS Variables โ
Vue SFC
Every breadcrumb is themed through --mono-breadcrumb-* custom properties. Setting one on the element, on any wrapper/ancestor, or inline all work โ custom properties inherit, and they pierce the shadow-DOM boundary, so the same overrides apply to <mono-breadcrumb> and the shadow build. The size and color props set presets, but an explicit --mono-breadcrumb-* override always wins. To re-skin globally, set the underlying --theme-* tokens.
| Variable | Default | Controls |
|---|---|---|
--mono-breadcrumb-accent | --theme-primary | Hover / current / pill color (set by color) |
--mono-breadcrumb-text-soft | text 72% | Link text color |
--mono-breadcrumb-text-faint | text 45% | Separator color |
--mono-breadcrumb-border-lite | border 55% | contained item border |
--mono-breadcrumb-radius | 5px | Item corner radius (set by size) |
--mono-breadcrumb-pad-x | 0.35rem | Item horizontal padding (set by size) |
--mono-breadcrumb-pad-y | 0.18rem | Item vertical padding (set by size) |
--mono-breadcrumb-gap | 0.25rem | Gap between items (set by size) |
--mono-breadcrumb-font | --theme-title-font-sm | Label font size (set by size) |
--mono-breadcrumb-icon-size | 0.8rem | Leading-icon size (set by size) |
--mono-breadcrumb-sep-font | 0.66rem | Separator font size (set by size) |
Types โ
Import
import { BreadcrumbProps, BreadcrumbListProps } from 'mono-helper'| Prop | Value | Default | Description |
|---|---|---|---|
<mono-breadcrumb> | |||
items | BreadcrumbItem[] | โ | List of breadcrumb segments to render. |
modelValue | null | BreadcrumbItem | โ | Two-way bound currently selected breadcrumb item. |
variant | 'default' | 'contained' | 'underlined' | โ | Visual style of the breadcrumb. |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | โ | Size of the breadcrumb. |
color | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'surface' | โ | Color theme of the breadcrumb. |
separator | string | โ | Separator character shown between segments. |
truncate | boolean | โ | Truncates long segment titles with an ellipsis. |
disabled | boolean | โ | Disables interaction with all segments. |
cssClass | BreadcrumbCssClass | โ | Per-part class overrides for styling internal elements. |
cssClassName | string | โ | Extra class applied to the root element. |
<mono-breadcrumb-list> | |||
items | BreadcrumbItem[] | โ | List of breadcrumb segments to render. |
item | BreadcrumbItem | โ | A single breadcrumb item to render. |
title | string | โ | Direct single-row props. |
href | string | โ | Link target for this segment. |
icon | string | โ | Icon name shown before the segment title. |
badge | string | number | โ | Badge text or count shown on the segment. |
badgeColor | 'primary' | 'success' | 'danger' | 'warning' | 'info' | 'default' | โ | Color theme of the segment badge. |
current | boolean | โ | Marks this segment as the current one. |
disabled | boolean | โ | Disables interaction with this segment. |
variant | 'default' | 'contained' | 'underlined' | โ | Standalone styling โ only used when there is no parent `<mono-breadcrumb>`. |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | โ | Size of the breadcrumb when standalone. |
color | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'surface' | โ | Color theme of the breadcrumb when standalone. |
separator | string | โ | Separator character shown between segments when standalone. |
truncate | boolean | โ | Truncates long segment titles when standalone. |