Stepper

BetaAccessible

If a form is divided into multiple pages or steps, the Form progress component helps the user to understand the progression and to navigate between form steps.

Note about multi-page forms!
This documentation page is about HDS multi-page stepper component. If you are looking for documentation about building multi-page forms, please refer to HDS multi-page form pattern documentation page.

Code

Code examples

Default

Press Enter to start editing. Press Esc to stop editing.

Small

Press Enter to start editing. Press Esc to stop editing.

With a step heading

Press Enter to start editing. Press Esc to stop editing.

Overflow

Press Enter to start editing. Press Esc to stop editing.

Step states

Press Enter to start editing. Press Esc to stop editing.

Packages

PackageIncludedStorybook linkSource link
HDS React
Yes
View in StorybookView source
HDS Core
No
--

Properties

Note! You can find the full list of properties in the React Storybook.

Table 1: Stepper properties
PropertyDescriptionValuesDefault value
headingClassNameA custom class name for step heading.string-
languageThe language of the stepper."fi" "sv" "en""fi"
onStepClickA callback function for custom action on step click.function-
selectedStepThe index of the selected step.number-
smallIf set to true, the small variant is used.booleanfalse
stepHeadingIf set to true, a step heading is shown below the stepper.booleanfalse
stepHeadingAriaLevelA step heading aria level.number2
stepsThe steps of the stepper.Steps-

This component also accepts all nativediv element props.

Following component properties override their native counterparts:

  • dataTestId overrides the data-testid

Some native element props (className) are split into multiple children in the component.