mifi / react-lottie-player

Fully declarative React Lottie player
MIT License
495 stars 52 forks source link

How to animate specific part #47

Open Manthan-p opened 2 years ago

Manthan-p commented 2 years ago

Hello,

I want to animate the specific part of the Logo, I have used the react-lottie-player package and put all the necessary props.

Here below, is the code that I have integrated. I want to animate only the last character of my logo.

<Lottie
      loop
      animationData={animationData.default}
      play
      segments={[0,80]}
      style={{ width: 150, height: 100 }}
    />

in animationData.default I have passed the JSON of the logo.

Can you please help me to get the expected output?

mifi commented 2 years ago

See the live example: https://mifi.github.io/react-lottie-player/

Segments works there. Maybe you can start from that code and replace with your own animation?