API reference for Angular Material stepper

import {MatStepperModule} from '@angular/material/stepper';

Stepper data that is required for internationalization.

Properties
Name Description

changes: Subject<void>

Stream that emits whenever the labels here are changed. Use this to notify components if the labels have changed after initialization.

completedLabel: string

Label that is used to indicate step as completed to screen readers.

editableLabel: string

Label that is used to indicate step as editable to screen readers.

optionalLabel: string

Label that is rendered below optional steps.

Selector: [matStepLabel]

Selector: mat-step

Exported as: matStep
Properties
Name Description
@Input('aria-label')

ariaLabel: string

Aria label for the tab.

@Input('aria-labelledby')

ariaLabelledby: string

Reference to the element that the tab is labelled by. Will be cleared if aria-label is set at the same time.

@Input()

color: ThemePalette

Theme color for the particular step.

@Input()

completed: boolean

Whether step is marked as completed.

@Input()

editable: boolean

Whether the user can return to this step once it has been marked as completed.

@Input()

errorMessage: string

Error message to display when there's an error.

@Input()

hasError: boolean

Whether step has an error.

@Input()

label: string

Plain text label of the step.

@Input()

optional: boolean

Whether the completion of step is optional.

@Input()

state: StepState

State of the step.

@Input()

stepControl: AbstractControlLike

The top level abstract control of the step.

@Output('interacted')

interactedStream: EventEmitter<CdkStep>

Emits when the user has attempted to move away from the step.

content: TemplateRef<any>

Template for step content.

interacted: false

Whether user has attempted to move away from the step.

stepLabel: MatStepLabel

Content for step label given by <ng-template matStepLabel>.

Methods
isErrorState

Custom error state matcher that additionally checks for validity of interacted form.

Parameters

control

FormControl

form

NgForm | FormGroupDirective

Returns
boolean

reset

Resets the step to its initial state. Note that this includes resetting form data.

select

Selects this step component.

Selector: mat-horizontal-stepper

Deprecated
Properties
Name Description
@Input()

linear: boolean

Whether the validity of previous steps should be checked or not.

@Input()

orientation: StepperOrientation

Orientation of the stepper.

@Input()

selected: CdkStep | undefined

The step that is selected.

@Input()

selectedIndex: number

The index of the selected step.

@Output()

selectionChange: EventEmitter<StepperSelectionEvent>

Event emitted when the selected step has changed.

animationDone: EventEmitter<void>

color: ThemePalette

disableRipple: boolean

labelPosition: 'bottom' | 'end'

steps: QueryList<MatStep>

Methods
next

Selects and focuses the next step in list.

previous

Selects and focuses the previous step in list.

reset

Resets the stepper to its initial state. Note that this includes clearing form data.

Selector: mat-vertical-stepper

Deprecated
Properties
Name Description
@Input()

linear: boolean

Whether the validity of previous steps should be checked or not.

@Input()

orientation: StepperOrientation

Orientation of the stepper.

@Input()

selected: CdkStep | undefined

The step that is selected.

@Input()

selectedIndex: number

The index of the selected step.

@Output()

selectionChange: EventEmitter<StepperSelectionEvent>

Event emitted when the selected step has changed.

animationDone: EventEmitter<void>

color: ThemePalette

disableRipple: boolean

labelPosition: 'bottom' | 'end'

steps: QueryList<MatStep>

Methods
next

Selects and focuses the next step in list.

previous

Selects and focuses the previous step in list.

reset

Resets the stepper to its initial state. Note that this includes clearing form data.

Selector: mat-stepper mat-vertical-stepper mat-horizontal-stepper [matStepper]

Exported as: matStepper, matVerticalStepper, matHorizontalStepper
Properties
Name Description
@Input()

color: ThemePalette

Theme color for all of the steps in stepper.

@Input()

disableRipple: boolean

Whether ripples should be disabled for the step headers.

@Input()

labelPosition: 'bottom' | 'end'

Whether the label should display in bottom or end position. Only applies in the horizontal orientation.

@Input()

linear: boolean

Whether the validity of previous steps should be checked or not.

@Input()

orientation: StepperOrientation

Orientation of the stepper.

@Input()

selected: CdkStep | undefined

The step that is selected.

@Input()

selectedIndex: number

The index of the selected step.

@Output()

animationDone: EventEmitter<void>

Event emitted when the current step is done transitioning in.

@Output()

selectionChange: EventEmitter<StepperSelectionEvent>

Event emitted when the selected step has changed.

steps: QueryList<MatStep>

Steps that belong to the current stepper, excluding ones from nested steppers.

Methods
next

Selects and focuses the next step in list.

previous

Selects and focuses the previous step in list.

reset

Resets the stepper to its initial state. Note that this includes clearing form data.

Button that moves to the next step in a stepper workflow.

Selector: button[matStepperNext]

Properties
Name Description
@Input()

type: string

Type of the next button. Defaults to "submit" if not specified.

Button that moves to the previous step in a stepper workflow.

Selector: button[matStepperPrevious]

Properties
Name Description
@Input()

type: string

Type of the previous button. Defaults to "button" if not specified.

Selector: mat-step-header

Properties
Name Description
@Input()

active: boolean

Whether the given step label is active.

@Input()

color: ThemePalette

Theme color palette for the component.

@Input()

disableRipple: boolean

Whether the ripple should be disabled.

@Input()

errorMessage: string

Error message to display when there's an error.

@Input()

iconOverrides: { [key: string]: TemplateRef<MatStepperIconContext>; }

Overrides for the header icons, passed in via the stepper.

@Input()

index: number

Index of the given step.

@Input()

label: MatStepLabel | string

Label of the given step.

@Input()

optional: boolean

Whether the given step is optional.

@Input()

selected: boolean

Whether the given step is selected.

@Input()

state: StepState

State of the given step.

defaultColor: ThemePalette | undefined

Default color to fall back to if no value is set.

Methods
focus

Focuses the step header.

Parameters

origin?

FocusOrigin

options?

FocusOptions

Template to be used to override the icons inside the step header.

Selector: ng-template[matStepperIcon]

Properties
Name Description
@Input('matStepperIcon')

name: StepState

Name of the icon to be overridden.

templateRef: TemplateRef<MatStepperIconContext>

Content for a mat-step that will be rendered lazily.

Selector: ng-template[matStepContent]

Template context available to an attached matStepperIcon.

Properties
Name Description

active: boolean

Whether the step is currently active.

index: number

Index of the step.

optional: boolean

Whether the step is optional.