The Stepper component displays a wizard-like workflow by guiding users through the multi-step progression.
Stepper consists of a combination of StepList, Step, StepPanels and StepPanel components. The value property is essential for associating Step and StepPanel with each other.
Vertical layout requires StepItem as a wrapper of Step and StepPanel components.
When linear property is present, current step must be completed in order to move to the next step.
Use Stepper with a StepList only for custom requirements where a progress indicator is needed.
Custom content for a step is defined with the default slot. The optional as property controls the default container element of a step, for example setting it to a button renders a button for the header instead of a div. The asChild option enables the headless mode for further customization by passing callbacks and properties to implement your own step.
Stepper container is defined with the tablist role, as any attribute is passed to the container element aria-labelledby can be optionally used to specify an element to describe the Stepper. Each stepper header has a tab role and aria-controls to refer to the corresponding stepper content element. The content element of each stepper has tabpanel role, an id to match the aria-controls of the header and aria-labelledby reference to the header as the accessible name.
| Key | Function |
|---|---|
| tab | Moves focus through the header. |
| enter | Activates the focused stepper header. |
| space | Activates the focused stepper header. |