Modifiers
Customize animations with modifiers
You can customize the duration, delay, timing function, and play state of any animation.
- Duration:
motion-duration-500 - Delay:
motion-delay-500 - Timing Function:
motion-timing-spring-bouncy - Play State:
motion-pausedormotion-running
For example:
This applies a duration of 2000ms to both the rotation and opacity animations.
Animation Play State
You can pause and resume animations using the play state utilities:
Modifiers for each property
You can apply modifiers to specific properties using a slash /.
For example:
Here, the delay of 500ms is applied only to the rotation, not the opacity.
Ease Functions
The plugin includes custom timing functions:
a few examples are:
motion-ease-spring-smoothmotion-ease-spring-snappymotion-ease-spring-bouncymotion-ease-spring-bounciestmotion-ease-bouncemotion-ease-bouncemotion-ease-in-quart
Loop Modifiers
Loops support two animation styles controlled by modifiers:
mirror(default): Animation reverses direction when reaching the endreset: Animation resets to starting position when reaching the end
Loop Count
Control how many times the animation repeats using the motion-loop utility:
motion-loop-once: Animation repeats oncemotion-loop-twice: Animation repeats twicemotion-loop-infinite: Animation repeats indefinitely (default)