Skip to main content
Timing animations can loop indefinitely. Set the loop option on a timing transition to one of two modes:
  • 'repeat' — restarts the animation from the beginning each cycle
  • 'reverse' — alternates direction, animating forward then backward
Spring animations do not support looping. loop is only available on type: 'timing' transitions.
initialAnimate is required for looping. It defines the starting value the animation resets to (for 'repeat') or reverses from (for 'reverse'). Without it, the loop has no defined start point.

Examples

Pulsing opacity

Uses loop: 'reverse' to fade between 0.3 and 1 continuously.

Marquee-style scroll

Uses loop: 'repeat' to scroll content from its starting position to -300 pixels, then jump back and repeat.

Loop modes compared