Skip to main content
rule CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/lottie.md
Open on GitHub

What 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 style prop.

How to install lottie

Manually: put the files in place

.claude/rules/lottie.md

The paths frontmatter field limits the files

Step 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.

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set33

The whole set →
can-decode Checks whether the browser can decode a video or audio stream before attempting playback using Mediabunny. CX Codex +1 ★ 849repo stars assets The assets rule guides Claude Code in adding images, video, audio, and fonts to Remotion projects. Use it when an agent needs to wire media into a composition. CX Codex +1 ★ 849repo stars get-video-dimensions get-video-dimensions — a Claude rule that hands the agent working Mediabunny code for reading a video's width and height, whether the file sits behind a URL, on disk, or in Remotion. CX Codex +1 ★ 849repo stars charts Guidelines for building Remotion charts and animated metrics without frame flickering. CX Codex +1 ★ 849repo stars import-srt-captions import-srt-captions — a Claude Code rule for importing .srt subtitle files into Remotion video projects. Uses parseSrt() from @remotion/captions to extract subtitles and integrate them into components. CX Codex +1 ★ 849repo stars 3d 3d enforces proper Three.js and React Three Fiber conventions for deterministic video rendering in Remotion. CX Codex +1 ★ 849repo stars parameters Explains how to add video parameterization using Zod schemas in Remotion compositions. Lets users edit parameters visually in the sidebar instead of hardcoding them. CX Codex +1 ★ 849repo stars sequencing sequencing — a rule for managing component timing in Remotion videos. Uses Sequence for delays and Series for sequential playback, with support for nested and overlapping scenes. CX Codex +1 ★ 849repo stars

Project sponsors

Companies that keep this analytics open