# Remotion Rule: Lottie > Remotion skill rule: Embedding Lottie animations in Remotion.. Part of the official Remotion Agent Skill for programmatic video in React. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash npx skills add remotion-dev/skills ``` This rule activates automatically when working with lottie in a Remotion project. --- ## Intro Embedding Lottie animations in Remotion.. Part of the [Remotion AI Skill](https://tokrepo.com/en/workflows/57997ead-c8fa-409c-916f-28bbc0adc8d9) — the official Agent Skill for programmatic video creation in React. **Best for**: Developers using Remotion for lottie **Works with**: Claude Code, OpenAI Codex, Cursor --- ## Rule Content # Using Lottie Animations in Remotion ## Prerequisites First, the @remotion/lottie package needs to be installed. If it is not, use the following command: ```bash 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()` and `continueRender()` - Save the animation data in a state - Render the Lottie animation using the `Lottie` component from the `@remotion/lottie` package ```tsx import { Lottie, LottieAnimationData } from "@remotion/lottie"; import { useEffect, useState } from "react"; import { cancelRender, continueRender, delayRender } from "remotion"; export const MyAnimation = () => { 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: ```tsx return ( ); ``` --- ## Source & Thanks > Created by [Remotion](https://github.com/remotion-dev). Licensed under MIT. > [remotion-dev/skills](https://github.com/remotion-dev/skills) — Rule: `lottie` Part of the [Remotion AI Skill](https://tokrepo.com/en/workflows/57997ead-c8fa-409c-916f-28bbc0adc8d9) collection on TokRepo. --- Source: https://tokrepo.com/en/workflows/2348d25f-2fd3-43cf-9672-56dcf6010174 Author: Skill Factory