Stepper
Angular Material Stepper presents a wizard or multi-step form in a linear sequence, guiding users through a defined set of steps. The headers can run across the top or down the side, each one marked as done, in progress or in error, and a linear stepper keeps the next step out of reach until the current one is valid. BuilderKit restyles the headers, the connecting lines and the step icons so the mat-stepper component matches the rest of the design system.
A step usually holds a form, so the inputs inside it sit in a form field, which is what shows the label and the error message under each control.
Example
A horizontal stepper with a form in each step, where errorMessage marks a step that was left invalid.
You are now done.
<mat-stepper [linear]="false" #stepper>
<mat-step [stepControl]="nameForm" label="Fill out your name">
<form [formRoot]="nameForm">
<ng-template matStepLabel>Fill out your name</ng-template>
<mat-form-field>
<mat-label>Name</mat-label>
<input matInput [formField]="nameForm.name" />
</mat-form-field>
<button matButton matStepperNext>Next</button>
</form>
</mat-step>
<mat-step [stepControl]="addressForm" label="Fill out your address">
<form [formRoot]="addressForm">
<mat-form-field>
<mat-label>Address</mat-label>
<input matInput [formField]="addressForm.address" />
</mat-form-field>
<button matButton matStepperPrevious>Back</button>
<button matButton matStepperNext>Next</button>
</form>
</mat-step>
<!-- Custom icons -->
<ng-template matStepperIcon="edit">
<mat-icon svgIcon="pencil" class="size-3"/>
</ng-template>
<ng-template matStepperIcon="done">
<mat-icon svgIcon="check" class="size-4"/>
</ng-template>
<ng-template matStepperIcon="error">
<mat-icon svgIcon="circle-alert" class="size-3.5"/>
</ng-template>
</mat-stepper>Vertical stepper
orientation="vertical" stacks the headers down the side and opens the content of the current step underneath its own header, with a line connecting one step to the next.
Pick the plan that fits your team.
Tell us where to send the invoice.
Everything is ready to go.
<mat-stepper orientation="vertical">
<mat-step label="Choose a plan">
<p>Pick the plan that fits your team.</p>
<button matButton matStepperNext>Next</button>
</mat-step>
<mat-step label="Add your details">
<p>Tell us where to send the invoice.</p>
<button matButton matStepperPrevious>Back</button>
<button matButton matStepperNext>Next</button>
</mat-step>
<mat-step label="Confirm">
<p>Everything is ready to go.</p>
<button matButton matStepperPrevious>Back</button>
</mat-step>
<!-- Custom icons -->
<ng-template matStepperIcon="edit">
<mat-icon svgIcon="pencil" class="size-3"/>
</ng-template>
<ng-template matStepperIcon="done">
<mat-icon svgIcon="check" class="size-4"/>
</ng-template>
<ng-template matStepperIcon="error">
<mat-icon svgIcon="circle-alert" class="size-3.5"/>
</ng-template>
</mat-stepper>