Animation in Angular Stepper component
27 Apr 20242 minutes to read
The Stepper progress state can be animated, smoothly transitioning from one step to another. You can customize the animation’s duration
and delay
by using the animation property.
You can disable the animation by setting the enable property to false
. By default, the value is true
.
Fields | Type | Description |
---|---|---|
duration | number |
Specifies the duration of the animated transition for each step. The default value is 2000 milliseconds. |
delay | number |
Specifies the delay to initiate the animated transition for each step in milliseconds. The default value is 0 . |
The example demonstrates the animation duration
and delay
settings for the Stepper.
import { Component } from "@angular/core";
import { StepperAnimationSettingsModel } from "@syncfusion/ej2-angular-navigations";
@Component({
imports: [ StepperAllModule, StepperModule ],
standalone: true,
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
public animateStepper: StepperAnimationSettingsModel = {enable: true, duration: 2000, delay: 500};
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
<div class="stepperAnimation">
<ejs-stepper [animation]="animateStepper">
<e-steps>
<e-step></e-step>
<e-step></e-step>
<e-step></e-step>
<e-step></e-step>
</e-steps>
</ejs-stepper>
</div>