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

Class MatStepper

src/material/stepper/stepper.ts:137–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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