BreadcrumbItem

Navigation
stable

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

Aperçu

Rendu de l’aperçu en cours…

default

Rendu de l’aperçu en cours…

active

Rendu de l’aperçu en cours…

with icon

Rendu de l’aperçu en cours…

disabled

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

title
requis
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

Emplacements de contenu exposés par ce composant.

#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

Événements émis par ce composant.

@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

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Interactions clavier

Interactions clavier
ToucheAction
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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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).

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic item

vue

Active (current page)

vue

With icons

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.