All skills
Skillintermediate
Using Lottie Animations in Remotion
First, the @remotion/lottie package needs to be installed. If it is not, use the following command:
Claude Code Knowledge Pack7/10/2026
Overview
Using Lottie Animations in Remotion
Prerequisites
First, the @remotion/lottie package needs to be installed. If it is not, use the following command:
npx remotion add @remotion/lottie # If project uses npm
bunx remotion add @remotion/lottie # If project uses bun
yarn remotion add @remotion/lottie # If project uses yarn
pnpm exec remotion add @remotion/lottie # If project uses pnpm
Displaying a Lottie file
To import a Lottie animation:
- Fetch the Lottie asset
- Wrap the loading process in
delayRender()andcontinueRender() - Save the animation data in a state
- Render the Lottie animation using the
Lottiecomponent from the@remotion/lottiepackage
const [handle] = useState(() => delayRender('Loading Lottie animation'));
const [animationData, setAnimationData] = useState(null);
useEffect(() => {
fetch('https://assets4.lottiefiles.com/packages/lf20_zyquagfl.json')
.then((data) => data.json())
.then((json) => {
setAnimationData(json);
continueRender(handle);
})
.catch((err) => {
cancelRender(err);
});
}, [handle]);
if (!animationData) {
return null;
}
return ;
};
Styling and animating
Lottie supports the style prop to allow styles and animations:
return ;