Overview
Lottie animations in React: one component for the easy path, the whole engine when you need control.
One component plays a Lottie file. The hook, the instance and the whole engine underneath are yours when you want them.
import { Lottie } from "lottie-react";export function FirstAnimation() { return <Lottie src="/anim.json" autoplay loop />;}Where to go
- Installation: install it, and what comes with it.
- First animation: the component path and the hook path.
- Rendering: load, start, repeat and size an animation.
- Driving with props: change a running animation from React.
- Examples: copy-ready pieces, simple to complex.
- Migration from v2: every v2 surface, and where it went.