Create

Navigation

Stepper

New
Copy page View as Markdown Open in ChatGPT Open in Claude

Shows progress through a sequence of steps and the content of the current step.

Usage#

app.component.ts
import { WDS_STEPPER } from '@wds/angular/stepper';

Put wds-stepper-item elements (the steps) and, optionally, wds-stepper-panel elements (their content, in the same order) in wds-stepper. value is the active step, counted from 1; steps before it are completed. Name the stepper with aria-label.

Examples#

Default#

Steps are buttons: a click goes to the step and fires wds-change. Completed steps show a check mark.

Description#

description adds a line under the title.

Wizard#

Panels show the content of the active step. Back and Next change value (or call previous() and next()); a value one past the last step marks all steps as completed.

Project nameInvite by email
Check the details and create the project.
Back Next

Vertical#

orientation="vertical" stacks the steps; panels, if any, show next to them.

Progress bar#

variant="bar" draws each step as a segment of a progress bar with the title below.

Icons#

An icon in the icon slot replaces the number; completed steps still show the check mark.

Loading and disabled#

loading shows a spinner in the circle, disabled blocks a step. readonly turns the steps into a progress display that cannot be clicked.

Linear#

With linear only completed steps and the active one can be chosen; later steps open with Next.

API References#

wds-stepper#

Shows progress through a sequence of steps (a wizard, a checkout, an onboarding) and the content of the active step. Steps before the active one are completed. The steps are buttons that go to their step, unless the stepper is readonly; with linear only completed steps and the next one can be chosen.

Attributes

AttributeTypeDefaultDescription
valuenumber1The active step, counted from 1. A value greater than the number of steps marks all steps as completed.
orientationWdsStepperOrientation'horizontal'Layout: steps in a row, or in a column with the content next to them.
variantWdsStepperVariant'default'bar: each step is a segment of a progress bar with its title below.
linearbooleanfalseOnly completed steps and the one after them can be chosen.
readonlybooleanfalseThe steps only show progress and cannot be clicked.

Events

EventDescription
wds-changeCustomEvent<WdsStepperChangeDetail>The user chose a step (a click on a step).

Methods

MethodDescription
next()Goes to the next step.
previous()Goes to the previous step.
goTo(step: number)Goes to a step (from 1; the number of steps + 1 marks all as completed).

Slots

SlotDescription
(default)wds-stepper-item elements (the steps) and wds-stepper-panel elements (their content, in the same order).

CSS custom properties

PropertyDescription
--wds-stepper-indicator-sizeSize of the step circles (default 32px).

wds-stepper-item#

One step of wds-stepper: a numbered circle (a check mark when completed, a spinner while loading, or your icon), a title and an optional description, and a line to the next step. The stepper sets its number and state.

Attributes

AttributeTypeDefaultDescription
headingstring''Title of the step.
descriptionstring''Description under the title.
completedbooleanfalseMarks the step as completed even when it is after the active one.
disabledbooleanfalseThe step cannot be chosen.
loadingbooleanfalseShows a spinner in the circle (e.g. while the step is being saved).

Slots

SlotDescription
iconAn icon in the circle instead of the number (the check mark still shows when completed).
titleTitle (instead of heading).
descriptionDescription (instead of description).

CSS parts (::part)

PartDescription
triggerThe step: a native <button>, or a <div> when it cannot be chosen.
indicatorThe circle (or the bar segment with variant="bar").
titleThe title.
descriptionThe description.
separatorThe line to the next step.

wds-stepper-panel#

Content of one step in wds-stepper. Panels follow the steps in order: the first panel belongs to the first step. Only the panel of the active step is visible. It is a group named by the step's title.

Slots

SlotDescription
(default)Content of the step (e.g. form fields).

Accessibility#

Screen reader#

The stepper is a group; name it with aria-label. Each step is a button (a plain element with readonly) with aria-current="step" on the active one.

Every step is read with its position and state, e.g. "Step 2 of 4, current: Shipping", so the progress does not depend on color or the check mark.

A panel is a group named by the title of its step. After Next, move focus to the first field of the new panel if the user continues typing there.

Keyboard support#

KeyFunction
TabMoves focus to the next step that can be chosen, then into the active panel.
EnterGoes to the focused step.
SpaceGoes to the focused step.
Footer