Animation in EJ2 JavaScript Stepper control

5 Jan 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.

var animationStepper = new ej.navigations.Stepper({
    steps: [{}, {}, {}, {} ],
    animation: {enable: true, duration: 2000, delay: 500}
  });
  animationStepper.appendTo("#stepper");
<!DOCTYPE html>
<html lang="en">

<head>
  <title>Essential JS 2 - Stepper</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  <meta name="description" content="Essential JS 2">
  <meta name="author" content="Syncfusion">
  <link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet">
  <link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet">
  <link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet">
  <!--system js reference and configuration-->
  <script src="https://cdn.syncfusion.com/ej2/29.1.33/dist/ej2.min.js" type="text/javascript"></script>
  <style>
    #container {
      margin-top: 30px;
      padding: 30px;
    }
  </style>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>

<body>
  <div id="container">
    <nav id="stepper"></nav>
  </div>
  <script src="index.js" type="text/javascript"></script>
</body>
</html>