Composite

Stepper

Multi-step wizard. Numbered headers with completed / active / pending states, content body for the active step. Two-way bind [(active)] to the step index.

Installation

import { WrStepper, WrStep } from 'ngwr/stepper';

@Component({ imports: [WrStepper, WrStep] })
export class MyComponent {
  protected readonly step = signal(0);
}

Basic

Click any header to jump to that step.

<wr-stepper [(active)]="step">
  <wr-step label="Account">Account form…</wr-step>
  <wr-step label="Profile" description="Optional">Profile form…</wr-step>
  <wr-step label="Confirm">Review and submit…</wr-step>
</wr-stepper>

Tell us about your account.

Fill in your profile details.

Review and submit.

Linear

Headers past the latest completed step are locked. Use next() / prev() to navigate.

<wr-stepper #stepper [(active)]="step" linear>
  <wr-step label="One" [completed]="oneDone()">…</wr-step>
  <wr-step label="Two" [completed]="twoDone()">…</wr-step>
  <wr-step label="Three">…</wr-step>
</wr-stepper>

<button (click)="stepper.next()">Next</button>

Step one — click Next to advance.

Step two.

Final step.

PrevNext

Vertical

<wr-stepper [(active)]="step" orientation="vertical">
  <wr-step label="Pick a plan">…</wr-step>
  <wr-step label="Billing">…</wr-step>
  <wr-step label="Done">…</wr-step>
</wr-stepper>

Choose monthly or yearly.

Enter payment details.

All set.

Narrow container (container query)

With responsive, a horizontal stepper queries its own width and drops to the vertical layout when its column is too narrow — even on a wide page. The box below is fixed at 340px.

Tell us about your account.

Fill in your profile details.

Review and submit.

<div style="width: 340px"><wr-stepper responsive>…</wr-stepper></div>

API

NameDescriptionTypeDefault
[(active)]Active step index (two-way bindable).number0
orientationLayout direction.'horizontal' | 'vertical''horizontal'
linearLock steps after the latest completed one.booleanfalse
responsiveDrop a horizontal stepper to vertical when its own box is too narrow (container query, not viewport).booleanfalse
next() / prev() / goTo(i)Imperative navigation.method
<wr-step>.labelHeader text.string''
<wr-step>.descriptionSecondary header text.string''
<wr-step>.optionalMarks the step as optional in the header.booleanfalse
<wr-step>.completedOverride completion. When null, derived from active > index.boolean | nullnull
<wr-step>.disabledBlocks header clicks.booleanfalse

CSS variables

Custom properties ngwr/stepper publishes. Each default below is declared on the component's own selector, so a :root override is shadowed by it — set them on that selector, on a wrapper you scope yourself, or inline on the element. Unlike the BEM class names, these are the supported way to restyle the component.

VariableDefaultDeclared on
--wr-stepper-connectorvar(--wr-color-outline).wr-stepper
--wr-stepper-indicator-size1.75rem.wr-stepper
--wr-stepper-mutedvar(--wr-color-on-surface-muted).wr-stepper