# How do I loop, pause and resume a Lottie animation?

> Set loop to true (or a number of loops) when you load the animation, and call pause() and play() to stop and resume it. In lottie-react use the loop prop and a lottieRef; in Jetpack Compose pass iterations = LottieConstants.IterateForever and an isPlaying flag. To loop only part of an animation, use playSegments.

Updated November 2026. Source: https://www.exodeui.com/questions/how-to-loop-or-pause-lottie-animation/

## Key takeaways

- loop: true loops forever; loop: 3 loops three times
- pause() keeps the current frame; stop() goes back to the start
- playSegments([start, end], true) loops a section
- Compose: iterations = LottieConstants.IterateForever
- Pause offscreen animations to save battery

## Frequently asked questions

### What is the difference between pause and stop in Lottie?

pause() freezes on the current frame. stop() resets to the first frame.

### How do I loop a Lottie a set number of times?

In lottie-web pass a number to loop, such as loop: 3. In Compose pass that number to iterations.

### Why does my loop have a visible jump?

The first and last frames do not match. Make the end pose equal to the start pose in the source file.

### Should loading animations loop forever?

Only while loading. Stop or switch to a success or error state when the work finishes.

## Related

- [How to know when a Lottie completes](https://www.exodeui.com/questions/how-to-know-when-lottie-animation-completes)
- [Accessible motion and reduced motion](https://www.exodeui.com/learn/accessible-motion-reduced-motion)
- [How to use Lottie in React](https://www.exodeui.com/questions/how-to-use-lottie-in-react)
- [Lottie runtime in React](https://www.exodeui.com/learn/lottie-runtime-react)
