Utils
stagger
stagger
stagger
is used to offset the start time of each animation.
When defining an animation with one or more elements, delay
can be set with the stagger
function to delay each element's animation by the specified duration.
Options
stagger
accepts options as a second argument.
start
Default: 0
The initial delay from which to calculate subsequent delays.
from
Default: "first"
Specifies which element in the array from which to stagger. Can be set as "first"
, "center"
, "last"
, or a number to specify an index.
easing
Default: "linear"
Distributes the calculated easings across the computed total duration according to this easing function so that the interval between delays becomes longer or shorter over each animation.