Remotion Rule: Lottie
Remotion skill rule: Embedding Lottie animations in Remotion.. Part of the official Remotion Agent Skill for programmatic video in React.
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.
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.
How to use
- Install the Remotion skills collection:
npx skills add remotion-dev/skills
- The Lottie rule activates automatically when the agent detects Lottie-related work in a Remotion project.
- Use
@remotion/lottiecomponents in your Remotion composition.
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 }}
/>
);
};
Related on TokRepo
- Coding Tools -- Developer frameworks and coding skills
- Video Tools -- Video creation and editing tools
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
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.
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.
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.
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.
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
Related on TokRepo
Source & Thanks
Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule:
lottie
Part of the Remotion AI Skill collection on TokRepo.
Discussion
Related Assets
Claude-Flow — Multi-Agent Orchestration for Claude Code
Layers swarm and hive-mind multi-agent orchestration on top of Claude Code with 64 specialized agents, SQLite memory, and parallel execution.
ccusage — Real-Time Token Cost Tracker for Claude Code
CLI that reads ~/.claude logs and breaks down Claude Code token spend by day, session, and project — pluggable into your statusline.
SuperClaude — Workflow Framework for Claude Code
Adds 16+ slash commands, 9 cognitive personas, and a smart flag system to Claude Code in one pipx install.