Stepper
La progression dans un parcours en plusieurs étapes, en points ou en étapes numérotées, avec le compteur « Étape x sur y ».
Disponible pour
Angular: disponible Vue: disponible React: disponible React Native: disponible
Utilisation
- AccountEmail and password
- VerifyEnter the code
- RecoverySave the phrase
<div class="demo-stack" style="max-width: 40rem">
<sone-stepper [steps]="steps" [(current)]="setup" ariaLabel="Setup progress" disabled />
<sone-stepper [steps]="steps" [(current)]="account" variant="numbered" linear ariaLabel="Account setup" />
<div style="display: flex; gap: var(--space-2)">
<button soneBtn variant="outline" size="sm" type="button" (click)="back()">Back</button>
<button soneBtn size="sm" type="button" (click)="next()">Next</button>
</div>
</div>Importation
import {
SoneStepperComponent,
} from "@surface-one/angular/stepper";Référence de l’API
SoneStepperComponentComposant
Progress through a multi-step flow. `current` is the step INDEX, not its key: "Step x of y", `linear` and the completed / active / inactive split are index arithmetic, and a key is one `steps.findIndex()` away.
| Nom | Type | Par défaut |
|---|---|---|
steps | readonly SoneStep[] | [] |
currentbidirectionnelThe active step's index (0-based); out-of-range values are clamped. | number | 0 |
variant`dots` — the compact onboarding progress; `numbered` — circles with labels. | StepperVariant | "dots" |
orientation | StepperOrientation | "horizontal" |
linearOnly completed steps and the active one can be clicked — never a later one. | boolean | false |
disabledProgress display only: the steps are not buttons. | boolean | false |
showCountThe visible "Step x of y" text. | boolean | true |
ariaLabelThe group's accessible name. | string | null | $localize`Progress` |
| Nom | Type |
|---|---|
stepClickA user picked a step (`current` is already updated). | SoneStepClick |