lottie — Claude Code rule: Lottie in Remotion
This rule covers loading and displaying Lottie animations in Remotion. Use it when a rendered video needs a Lottie asset.
no license ★ 849 updated 2026-01-24
.claude/rules/lottie.mdWhat lottie does
The rule walks through fetching Lottie animation data and rendering it with the Lottie component from @remotion/lottie. It holds Remotion's render until the fetch finishes; if loading fails, the render is cancelled.
The project needs the @remotion/lottie package before you use the component. Animation data lives in React state, and delayRender() with continueRender() controls when rendering resumes. Without the package, the Lottie import will fail.
You can pass a style prop to set the animation's dimensions. This rule covers displaying an existing Lottie asset in Remotion, not authoring the animation itself.
What it helps with
- load a Lottie JSON asset into a Remotion component
- wait for animation data before rendering
- cancel rendering when the asset fetch fails
- set Lottie dimensions with
style
Example prompts for the agent
- Add a Remotion component that fetches Lottie JSON and displays it with
@remotion/lottie. - Hold rendering while Lottie data loads, then resume with
continueRender(); cancel on fetch errors. - Set the displayed Lottie animation's size through its
styleprop.
How to install lottie
Manually: put the files in place
.claude/rules/lottie.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/lottie.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/lottie.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/lottie.mdManually: put the files in place
.clinerules/lottie.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about lottie
How do I install lottie in Claude Code?
Add the rule file at .claude/rules/lottie.md.
What does the lottie rule do?
It explains how to fetch Lottie animation data and display it in Remotion with the Lottie component from @remotion/lottie.
What does a Remotion project need to use Lottie?
Install @remotion/lottie in the project before importing the Lottie component.