BreadcrumbItem
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…
defaultRendu de l’aperçu en cours…
activeRendu de l’aperçu en cours…
with iconRendu de l’aperçu en cours…
disabledStructure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<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--linkwhen href is set;--disabledwhen disabled. - 2.origam-breadcrumbs__prepend
- Prepend slot host. Inline-flex container rendering
prependAvatar,prependIconor the#prependslot. Rendered only whenhasPrependis true. - 3(default slot)
- Content area. Renders
<span>{{ title }}</span>by default. Override with the#defaultslot. - 4.origam-breadcrumbs__append
- Append slot host. Inline-flex container rendering
appendAvatar,appendIconor the#appendslot. Rendered only whenhasAppendis true.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- titlerequisstring
- Display text for the breadcrumb item. Rendered inside a <span> within the default slot when not overridden.
- disabledbooleanfalse
- Disables the item: sets opacity and pointer-events: none. The last item in an OrigamBreadcrumb trail is automatically disabled.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- tagstring'span'
- HTML element rendered at the root. Resolves to <a> automatically when href or to is provided (via useLink).
- targetstring
- Anchor target attribute, e.g. "_blank".
- relstring
- Anchor rel attribute, e.g. "noopener noreferrer".
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>false
- Applies a border to the item element.
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- Border-radius token or boolean for the item element.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- hrefstring
- URL for the breadcrumb link. Causes the root element to render as <a>.
- replaceboolean
- Vue Router destination. Automatically activates router-link behaviour.
- exactboolean
- color
- Foreground color. Accepts semantic intents or CSS colors.
- bgColor
- Background color of the item.
- Density modifier adjusting padding. Propagated from parent OrigamBreadcrumb.
- appendAvatarstring
- Image URL for an avatar in the append slot.
- appendIcon
- MDI icon displayed after the title text.
- prependAvatarstring
- Image URL for an avatar displayed in the prepend slot.
- prependIcon
- MDI icon displayed before the title text.
- prependAriaLabelstring
- appendAriaLabelstring
- hoverboolean | IStateEffectConfig
- hoverClassstring
- activeboolean | IStateEffectConfigfalse
- Forces the item into its active state. Also set automatically by useLink when the route matches.
- activeClassstring
- 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:appendMouseEvent
- Fired when the user clicks the append slot area.
- @click:prependMouseEvent
- Fired when the user clicks the prepend slot area.
- @update:hoverboolean
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
| Touche | Action |
|---|---|
| Tab | Moves focus to the breadcrumb item when it is a link. |
| Enter | Follows 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.
- colorvar(--origam-color__text---primary)
- Default item text color.
- colorvar(--origam-color__action--primary---bg)
- Item color on hover (link affordance).
- colorvar(--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
Active (current page)
With icons
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.