Creates a function that returns staggered values for distributing animation timing across multiple targets. Supports grid-based positioning, custom start points, easing functions, and various distribution patterns.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/juliangarnier/anime/llms.txt
Use this file to discover all available pages before exploring further.
Syntax
Parameters
The staggered value or range to distribute across targets.
- Single value: All targets receive the same stagger increment
- Range
[start, end]: Values interpolate from start to end across targets - Supports units (e.g.,
'100px',['0deg', '360deg'])
Configuration options for the stagger behavior.
Starting point for stagger distribution. Default:
'first'Number: Index of the target to start from'first': Start from the first target (index 0)'center': Start from the middle target'last': Start from the last target'random': Randomize stagger order
Grid dimensions
[columns, rows] for 2D stagger distribution.Axis to use for grid-based stagger calculation.
Easing function to apply to stagger distribution.
Reverses the stagger order. Default:
falseStarting offset value. Default:
0Override the total number of targets.
Property name or function to determine custom stagger index.
Function to modify the final stagger value.
Returns
A stagger function that generates values for each target:
Examples
Basic Stagger
Stagger with Range
Grid-Based Stagger
Stagger with Easing
Random Stagger Order
Custom Index with Property
Source
Defined in:/home/daytona/workspace/source/src/utils/stagger.js:82