LottieFiles / lottie-react

lottie web player as a react component
https://lottiefiles.com
MIT License
717 stars 80 forks source link

Pause the animation on the final frame #125

Closed AlexSterk closed 1 year ago

AlexSterk commented 1 year ago

Overview

Basically the title. Right now there is no way to keep the final frame after the animation has ended. The animation resets to the first frame.

Type

Motivation

What inspired this feature request? What problems were you facing, or what else makes you think this should be included?

I think the inspiration is fairly obvious. In some cases we want an animation to play once, and stay on the last frame afterwards. In a way it's similar to animation-fill-mode: forwards from css animations.

Love the simplicity of the use this library, but I think this would be a great add!

AlexSterk commented 1 year ago

It won't let me assign the label so sorry about that

AlexSterk commented 1 year ago

My bad, this was a feature. Had trouble finding it in the documentation, but after searching through the source code I found it