MCPcopy Create free account
hub / github.com/angular/components / MatStepper

Class MatStepper

src/material/stepper/stepper.ts:144–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 imports: [NgTemplateOutlet, MatStepHeader],
143})
144export class MatStepper extends CdkStepper implements AfterViewInit, AfterContentInit, OnDestroy {
145 private _ngZone = inject(NgZone);
146 private _renderer = inject(Renderer2);
147 private _animationsDisabled = _animationsDisabled();
148 private _cleanupTransition: (() => void) | undefined;
149 protected _isAnimating = signal(false);
150
151 /** The list of step headers of the steps in the stepper. */
152 @ViewChildren(MatStepHeader) override _stepHeader: QueryList<MatStepHeader> = undefined!;
153
154 /** Elements hosting the step animations. */
155 @ViewChildren('animatedContainer') _animatedContainers!: QueryList<ElementRef>;
156
157 /** Full list of steps inside the stepper, including inside nested steppers. */
158 @ContentChildren(MatStep, {descendants: true}) override _steps: QueryList<MatStep> = undefined!;
159
160 /** Steps that belong to the current stepper, excluding ones from nested steppers. */
161 override readonly steps: QueryList<MatStep> = new QueryList<MatStep>();
162
163 /** Custom icon overrides passed in by the consumer. */
164 @ContentChildren(MatStepperIcon, {descendants: true}) _icons!: QueryList<MatStepperIcon>;
165
166 /** Event emitted when the current step is done transitioning in. */
167 @Output() readonly animationDone: EventEmitter<void> = new EventEmitter<void>();
168
169 /** Whether ripples should be disabled for the step headers. */
170 @Input() disableRipple: boolean = false;
171
172 /**
173 * Theme color for all of the steps in stepper. This API is supported in M2
174 * themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/stepper/styling.
175 *
176 * For information on applying color variants in M3, see
177 * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
178 */
179 @Input() color: ThemePalette;
180
181 /**
182 * Whether the label should display in bottom or end position.
183 * Only applies in the `horizontal` orientation.
184 */
185 @Input()
186 labelPosition: 'bottom' | 'end' = 'end';
187
188 /**
189 * Position of the stepper's header.
190 * Only applies in the `horizontal` orientation.
191 */
192 @Input()
193 headerPosition: 'top' | 'bottom' = 'top';
194
195 /**
196 * ARIA label for the stepper.
197 */
198 @Input('aria-label')
199 ariaLabel: string | null = null;
200
201 /** The content prefix to use in the stepper header. */

Callers

nothing calls this directly

Calls 4

_onAnimationDoneMethod · 0.95
_animationsDisabledFunction · 0.90
signalFunction · 0.85
inputFunction · 0.85

Tested by

no test coverage detected