BreadcrumbItem

Navigation
stable

Individual breadcrumb link or span within an OrigamBreadcrumb trail. Supports router links, prepend/append icons, hover and active states.

Preview

Rendering the live preview…

default

Rendering the live preview…

active

Rendering the live preview…

with icon

Rendering the live preview…

disabled

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamBreadcrumbItemSchematic of the BreadcrumbItem component with 4 numbered internal parts. icon Home icon 1 2 3 4 origam-breadcrumb-item
Anatomy of <origam-breadcrumb-item> — root element ① (<span> or <a>), prepend slot ②, content area ③, append slot ④. Active items receive aria-current="page".
1.origam-breadcrumb-item
Root element. Renders as <span> or <a> via useLink. Carries color, border, rounded and density classes. Modifier --link when href is set; --disabled when disabled.
2.origam-breadcrumbs__prepend
Prepend slot host. Inline-flex container rendering prependAvatar, prependIcon or the #prepend slot. Rendered only when hasPrepend is true.
3(default slot)
Content area. Renders <span>{{ title }}</span> by default. Override with the #default slot.
4.origam-breadcrumbs__append
Append slot host. Inline-flex container rendering appendAvatar, appendIcon or the #append slot. Rendered only when hasAppend is true.

API

Props

All props accepted by this component, with their type, default value and description.

title
required
string
Display text for the breadcrumb item. Rendered inside a <span> within the default slot when not overridden.
disabled
boolean
false
Disables the item: sets opacity and pointer-events: none. The last item in an OrigamBreadcrumb trail is automatically disabled.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'span'
HTML element rendered at the root. Resolves to <a> automatically when href or to is provided (via useLink).
target
string
Anchor target attribute, e.g. "_blank".
rel
string
Anchor rel attribute, e.g. "noopener noreferrer".
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border to the item element.
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
Border-radius token or boolean for the item element.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
href
string
URL for the breadcrumb link. Causes the root element to render as <a>.
replace
boolean
Vue Router destination. Automatically activates router-link behaviour.
exact
boolean
color
Foreground color. Accepts semantic intents or CSS colors.
bgColor
Background color of the item.
density
'default'
Density modifier adjusting padding. Propagated from parent OrigamBreadcrumb.
appendAvatar
string
Image URL for an avatar in the append slot.
appendIcon
MDI icon displayed after the title text.
prependAvatar
string
Image URL for an avatar displayed in the prepend slot.
prependIcon
MDI icon displayed before the title text.
prependAriaLabel
string
appendAriaLabel
string
hover
boolean | IStateEffectConfig
hoverClass
string
active
boolean | IStateEffectConfig
false
Forces the item into its active state. Also set automatically by useLink when the route matches.
activeClass
string
Additional CSS class applied when the item is active (current page).

API

Slots

Content slots exposed by this component.

#default
Main content of the item. Defaults to rendering <span>{{ title }}</span>.
#prepend
Custom prepend content. Replaces the prependIcon / prependAvatar area.
#append
Custom append content. Replaces the appendIcon / appendAvatar area.

API

Emits

Events emitted by this component.

@click:append
MouseEvent
Fired when the user clicks the append slot area.
@click:prepend
MouseEvent
Fired when the user clicks the prepend slot area.
@update:hover
boolean

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to child components.
Ref<string>
Reactive CSS string generated by useStyle from the computed breadcrumbItemStyles.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Item foreground color. Falls back to inherit.
Item background color (transparent by default).
Item opacity. Set to --origam-breadcrumb-item---opacity-disabled (0.5) when disabled.
Text decoration of the item (none by default; can be set to underline for links).
Block-start padding (density-adjusted at render time).
Inline-start padding (density-adjusted at render time).
Density offset applied to padding. comfortable: −8px, default: 0px, compact: +8px.
Item border-radius. Overridden by the rounded prop.
Transition applied to transform and color properties.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Keyboard interactions

Keyboard interactions
KeyAction
TabMoves focus to the breadcrumb item when it is a link.
EnterFollows the link (href / to) of the focused item.

Notes

  • aria-current="page" is set on the active item (isActive = true) to indicate the current page to screen readers.
  • Disabled items use opacity and pointer-events: none rather than the native disabled attribute (which does not work on anchors).
  • The v-contrast directive is applied to the root element for automatic contrast when a custom color is set.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
color
var(--origam-color__text---primary)
Default item text color.
color
var(--origam-color__action--primary---bg)
Item color on hover (link affordance).
color
var(--origam-color__text---secondary)
Color of the current-page item (last crumb, disabled state).

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic item

vue

Active (current page)

vue

With icons

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.