Stepper
vig-stepper
import { Stepper } from '@vigdx/ui/stepper';Basic
label and an optional description . Bind [(activeIndex)] and render the panel for it yourself; a template reference gives access to next() and previous() for your own buttons. Every step is clickable.
Enter the email address for your order confirmation.
Linear
linear the user cannot click past the first incomplete step. Without completedSteps , every step before activeIndex counts as done; pass it to track completion yourself, e.g. once a step's form is valid. next() is not blocked by linear .
Vertical
orientation="vertical" stacks the steps, which suits narrow layouts and timelines. Here the stepper only displays progress.
Icons, errors and disabled steps
icon replaces the step number with a registered icon, error flags a step that needs attention, and disabled steps cannot be visited.
Styling hooks
Internal elements carry a stable data-part and the component's data-scope; both are public API, so removing one is a breaking change. Select a part by both, e.g. [data-scope="stepper"][data-part="list"] { … }: the pair stays within this component when kit components nest, and also reaches parts in overlay panels, which render outside the host. State is exposed through aria-* and, where listed, a data-state; literal values are checked by the API gate, values computed from the component's state follow its documented types. Other data-* attributes listed below (such as data-opening while an overlay animates) are API too. See Customizing.
Scope: [data-scope="stepper"]
| Part | Element | data-state |
|---|---|---|
list | <ol> of steps. | — |
step | <li> . | active, complete, error, upcoming, unreachable |
control | aria-current="step" ). | — |
marker | — | |
label | — | |
status | — | |
description | — | |
connector | — |
Accessibility
- Renders a
<nav>landmark named byariaLabelaround an ordered list of step buttons, so the step count and position are announced. - The current step carries
aria-current="step"; steps that cannot be reached (disabled, or past the first incomplete step whenlinear) arearia-disabledbut stay focusable so their label can still be read. - Completed and failed steps append a visually hidden status, overridable with
completedLabelanderrorLabelfor i18n. - The stepper does not move focus when the step changes. When your Next button swaps the panel, move focus to the new step's heading or first field.
API
Stepper
vig-stepperProgress indicator for a multi-step flow. Steps are data; the consumer
renders the panel for activeIndex. Each step is a button in an ordered
list: the current one carries aria-current="step", steps that cannot be
reached are aria-disabled. With linear, the user cannot jump past the
first incomplete step.
| Name | Type | Default | Description |
|---|---|---|---|
activeIndex | number | 0 | Index of the current step; two-way bindable with |
ariaLabel | string | undefined | undefined | — |
completedLabel | string | undefined | undefined | — |
completedSteps | readonly number[] | undefined | undefined | Indices of completed steps. When omitted, every step before
|
errorLabel | string | undefined | undefined | — |
linear | boolean | false | Steps can only be visited up to the first incomplete one. |
orientation | StepperOrientation | 'horizontal' | Layout of the steps. |
steps | readonly StepperStep[] | [] | — |
| Name | Payload | Description |
|---|---|---|
activeIndexChange | number | Index of the current step; two-way bindable with |
| Signature | Description |
|---|---|
isReachable(index: number): boolean | — |
next(): void | Advances to the next enabled step. Meant for the flow's own "Next"
button, called once the current step is valid, so |
previous(): void | Goes back to the previous enabled step. |
select(index: number): void | Activates a step when it is reachable. |