Remotion Rule: Text Animations
Remotion skill rule: Typography and text animation patterns for Remotion.. Part of the official Remotion Agent Skill for programmatic video in React.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install 29a4a1e6-f3d7-4c48-aa33-caddbd0bd35e --target codex先 dry-run 确认安装计划,再运行此命令。
What it is
Remotion Rule: Text Animations is a skill rule within the official Remotion Agent Skill that provides typography and text animation patterns for programmatic video creation in React. It covers fade-in, slide-in, typewriter, word-by-word reveal, and other text animation techniques using Remotion's interpolate and spring functions.
This rule is for developers building programmatic videos with Remotion who need ready-made text animation patterns. If you are creating explainer videos, title sequences, or social media content with animated text, this rule provides tested patterns to start from.
How it saves time or tokens
Instead of figuring out Remotion's interpolate API from scratch for each text effect, this rule provides copy-paste patterns for common animations. Each pattern uses Remotion's built-in timing functions correctly, handles edge cases like text overflow and line breaks, and follows Remotion best practices for performance. When using AI coding assistants, the rule activates automatically in Remotion projects, giving the AI correct context for generating text animations.
How to use
- Install the Remotion skills:
npx skills add remotion-dev/skills. - The text animation rule activates automatically when working with text in a Remotion project.
- Use the provided patterns as starting points and customize timing, easing, and styles.
Example
import { useCurrentFrame, interpolate, spring, useVideoConfig } from 'remotion';
export const FadeInText: React.FC<{text: string}> = ({text}) => {
const frame = useCurrentFrame();
const {fps} = useVideoConfig();
const opacity = interpolate(frame, [0, 30], [0, 1], {
extrapolateRight: 'clamp',
});
const translateY = spring({
frame,
fps,
config: {damping: 200},
});
return (
<div
style={{
opacity,
transform: `translateY(${(1 - translateY) * 50}px)`,
fontSize: 60,
fontWeight: 'bold',
}}
>
{text}
</div>
);
};
Related on TokRepo
- AI tools for video -- AI-powered video creation and editing tools
- AI tools for design -- design and visual content tools
Common pitfalls
- Using CSS transitions instead of Remotion's interpolate function. CSS animations are frame-rate independent and will not sync with Remotion's frame-based rendering. Always use interpolate or spring for animations.
- Not clamping interpolation values. Without
extrapolateRight: 'clamp', values continue beyond the target range, causing unexpected animation behavior after the transition completes. - Rendering too many text elements simultaneously. Each animated text component adds to render time. For complex typography, pre-compose text groups and animate the container rather than individual characters.
常见问题
A Remotion skill rule is a configuration file that provides patterns and best practices for specific aspects of Remotion video development. Rules activate automatically in AI coding assistants when working on relevant code, providing context-aware suggestions.
Yes. All animation patterns use Remotion's interpolate and spring functions with configurable parameters. You can adjust frame ranges, easing curves, damping, stiffness, and other timing properties to match your creative vision.
Yes. The text animation patterns work with any font you load into your Remotion project. Use the @remotion/google-fonts package for Google Fonts or load custom fonts via CSS @font-face declarations in your Remotion root.
Yes. The rule includes patterns for word-by-word reveal where each word appears with a staggered delay. Split your text by spaces, calculate per-word timing offsets, and apply individual interpolation to each word component.
Use a fixed-width container with CSS word-wrap and set overflow handling. For per-line animations, split text into lines programmatically using measureText or a layout library, then animate each line separately.
引用来源 (3)
- Remotion GitHub— Remotion enables programmatic video creation in React
- Remotion Interpolate Docs— Interpolate and spring functions for frame-based animations
- Remotion AI Docs— Remotion Agent Skills for AI-assisted video development
来源与感谢
Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule:
text-animations
Part of the Remotion AI Skill collection on TokRepo.
讨论
相关资产
Remotion Rule: Timing
Remotion skill rule: Interpolation curves in Remotion - linear, easing, spring animations. Part of the official Remotion Agent Skill for programmatic video in React.
Remotion Rule: Trimming
Remotion skill rule: Trimming patterns for Remotion - cut the beginning or end of animations. Part of the official Remotion Agent Skill for programmatic video in React.
Remotion Rule: Measuring Text
Remotion skill rule: Measuring text dimensions, fitting text to containers, and checking overflow. Part of the official Remotion Agent Skill for programmatic video in React.
Remotion Rule: Lottie
Remotion skill rule: Embedding Lottie animations in Remotion.. Part of the official Remotion Agent Skill for programmatic video in React.