StepperItem
Individual step inside a Stepper. Renders an indicator circle with its status (pending / active / done / error), a title, and an optional subtitle.
Aperçu
Rendu de l’aperçu en cours…
pendingRendu de l’aperçu en cours…
activeRendu de l’aperçu en cours…
doneRendu de l’aperçu en cours…
errorStructure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-stepper-item> — 4 internal parts. The root renders as <button> when clickable, <div> otherwise; the indicator circle shows step number, done-check or error-exclamation.- 1.origam-stepper-item
- Root element. Renders as
<button type="button">when clickable,<div>otherwise. Carries status and orientation modifier classes. - 2.origam-stepper-item__indicator
- Circular badge. Shows step number (pending), a check icon (done), an exclamation icon (error), or the custom icon prop. Background and border colour are token-driven per status.
- 3.origam-stepper-item__title
- Primary label. Font-weight and color driven by
--origam-stepper---title-*tokens. - 4.origam-stepper-item__subtitle
- Secondary label shown below the title. Smaller size and muted colour via
--origam-stepper---subtitle-*tokens.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- indexnumber0
- 0-based position of this step inside the stepper. Used to compute the status when status is not set explicitly.
- titlestring
- Step title rendered below the indicator. Also used to build the accessible aria-label for the step button.
- subtitlestring
- Optional secondary line rendered below the title in a smaller, muted style.
- icon
- Custom icon rendered inside the indicator circle for the pending state. The done/error states always use their dedicated MDI icons regardless of this prop.
- status
- Explicit status override (pending | active | done | error). When omitted, the status is computed from the parent Stepper modelValue and this item's index.
- clickablebooleanfalse
- Whether clicking the item navigates the stepper. Inherits the parent Stepper clickable setting; this prop can only force it to true.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
API
Emits
Événements émis par ce composant.
- @clicknumber
- Fired when the step is clicked (only when clickable is true). Payload is the step index.
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 a child component.
- ComputedRef<'pending' | 'active' | 'done' | 'error'>
- Computed status taking the explicit status prop or deriving it from the parent Stepper modelValue and this item's index.
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.
- Width and height of the step indicator circle.
- Background of the pending step indicator.
- Foreground of the pending step indicator.
- Active/done indicator colour. Controls both the border and the background tint.
- Background of the error state indicator.
- Font size of the step title.
- Font weight of the step title.
- Font size of the step subtitle.
- Colour of the step subtitle text.
- Gap between the indicator circle and the label column.
Inclusion
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Rôles ARIA
Interactions clavier
| Touche | Action |
|---|---|
| Tab | Moves focus to the next clickable step button. |
| Enter / Space | Navigates to this step when clickable is true. |
Notes
- The active step carries aria-current="step" so screen readers announce it as the current step in the sequence.
- When a title is provided, the step button receives an aria-label of the form "Step {n}: {title}" generated by the DS locale key origam.stepper.stepAriaLabel.
- The indicator circle carries aria-hidden="true" — its content (number, check, exclamation) is decorative because the aria-label on the root already conveys the step identity and status.
- Clickable items show a focus-visible outline using the stepper primary colour token. Non-clickable items have cursor: default and are not keyboard-reachable.
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.
- dimensionvar(--origam-space---8)
- Width and height of the step indicator circle.
- colorvar(--origam-color__action--primary---bg)
- Background of the active step indicator.
- colorvar(--origam-color__feedback--danger---bg)
- Background of the error state indicator.
- fontWeightvar(--origam-font__weight---medium)
- Font weight of the step title.
- colorvar(--origam-color__text---secondary)
- Colour of the step subtitle.
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.
Statuses
Clickable steps
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.