SkillsMar 29, 2026·1 min read

Remotion Rule: Lottie

Remotion skill rule: Embedding Lottie animations in Remotion.. Part of the official Remotion Agent Skill for programmatic video in React.

TL;DR
This Remotion rule teaches AI agents how to embed Lottie animations in React-based programmatic video.
§01

What it is

Remotion Rule: Lottie is a skill rule that activates automatically when working with Lottie animations in a Remotion project. It provides the coding patterns and API knowledge needed to embed Lottie JSON animations into programmatic video.

This rule targets developers using Remotion for video generation who want to add Lottie animations (motion graphics, icons, transitions) without manually reading the Lottie integration docs each time.

§02

How it saves time or tokens

The rule injects the correct Remotion-Lottie API patterns into the AI agent context automatically. Instead of the agent searching docs or guessing the API, it knows the exact component props, animation timing hooks, and frame synchronization patterns. Token estimate per use is approximately 500 tokens.

§03

How to use

  1. Install the Remotion skills collection:
npx skills add remotion-dev/skills
  1. The Lottie rule activates automatically when the agent detects Lottie-related work in a Remotion project.
  1. Use @remotion/lottie components in your Remotion composition.
§04

Example

import { Lottie, useLottie } from '@remotion/lottie';
import { useCurrentFrame, useVideoConfig } from 'remotion';
import animationData from './animation.json';

const MyAnimation: React.FC = () => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();
  const animation = useLottie({ animationData });

  if (!animation) return null;

  return (
    <Lottie
      animationData={animation}
      playbackRate={1}
      style={{ width: 400, height: 400 }}
    />
  );
};
§05

Related on TokRepo

§06

Common pitfalls

  • Lottie JSON files can be large. Optimize them with tools like lottie-compress or bodymovin settings to reduce bundle size.
  • Frame synchronization between Remotion and Lottie requires matching fps settings. Mismatched frame rates cause animation speed issues.
  • Not all Lottie features are supported by the web renderer. Complex After Effects expressions may not render correctly.

Frequently Asked Questions

What is the Remotion Lottie integration?+

The @remotion/lottie package provides React components for rendering Lottie animations inside Remotion compositions. It synchronizes Lottie playback with Remotion frame timing for frame-accurate animation in programmatic video.

How do I install the Remotion Lottie package?+

Run npm install @remotion/lottie in your Remotion project. The package provides the Lottie component and useLottie hook for loading and rendering Lottie JSON animation data.

Can I control Lottie playback speed in Remotion?+

Yes. The Lottie component accepts a playbackRate prop. Set it to values like 0.5 for half speed or 2 for double speed. The animation timing is synchronized with Remotion frames.

What file format does the Lottie integration expect?+

The integration expects Lottie JSON files exported from tools like Adobe After Effects with the Bodymovin plugin, or from LottieFiles. The JSON is passed as animationData to the useLottie hook.

Does this rule work with Claude Code?+

Yes. This rule is part of the official Remotion Agent Skill and works with Claude Code, OpenAI Codex, and Cursor. It activates automatically when the agent detects Lottie-related work in a Remotion project.

Citations (3)
  • Remotion GitHub— Remotion is a framework for creating videos programmatically in React
  • Remotion Lottie Docs— @remotion/lottie package for Lottie animation integration
  • LottieFiles— Lottie is an animation format by Airbnb for vector animations
🙏

Source & Thanks

Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule: lottie

Part of the Remotion AI Skill collection on TokRepo.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets