# lottie

This rule covers loading and displaying Lottie animations in Remotion. Use it when a rendered video needs a Lottie asset.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 849 repo stars
- Author: coleam00
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/coleam00/second-brain-skills/tree/HEAD/.claude/skills/remotion/rules/lottie.md
- Updated: 2026-01-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/lottie

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/lottie.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/lottie.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/lottie.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/lottie.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/lottie.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/coleam00/second-brain-skills/tree/HEAD/.claude/skills/remotion/rules/lottie.md

## When to use it
- 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
- 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.

## Similar
- [lottie-animations](https://affpapa.org/en/nevibecode/skills/lottie-animations.md) — skill · 3300 installs
- [lottie-bodymovin](https://affpapa.org/en/nevibecode/skills/lottie-bodymovin.md) — skill · 1200 installs
- [text-to-lottie](https://affpapa.org/en/nevibecode/skills/text-to-lottie.md) — skill · 11600 installs
- [lottie-animation](https://affpapa.org/en/nevibecode/skills/lottie-animation.md) — skill · 3800 installs
- [lottie-animation-delivery](https://affpapa.org/en/nevibecode/skills/lottie-animation-delivery.md) — skill · 137 installs
- [lottie-animations-generate_lottie_component](https://affpapa.org/en/nevibecode/commands/lottie-animations-generate-lottie-component.md) — command · ★ 1428 repo stars

From the same set: [coleam00/second-brain-skills](https://affpapa.org/en/nevibecode/by/coleam00/second-brain-skills.md) — 33 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
