Remotion Markup
Best practices for writing Remotion React Markup
Install
npx skills add guanyang/open-agent-hub --skill remotion-markup -g -a claude-code -y- Repository
- guanyang/open-agent-hub985
- Category
- Writing
- Updated
- 5d ago
- License
- MIT
- Context cost
- Mediumabout 2,334 tokens
- Runs scripts
- Yes, review before use
What it does
Best practices for writing Remotion React Markup
This is guidance for writing Remotion React Markup. If this is not relevant, load Remotion Best Practices instead.
General rules
Animate properties using useCurrentFrame() and interpolate().
Use interpolate() over spring().
Use Easing.bezier() to customize timing, including jumpy or overshooting motion.
Use Easing.spring() if you want spring animations
HTML Elements which make sense to be made interactive in the Studio should use Interactive: <div> -> <Interactive.Div>.
Set a descriptive name prop such as name="Hero title" for Interactive, Solid, Sequence.
import { useCurrentFrame, Easing, interpolate, Interactive } from "remotion";
export const FadeIn = () => {
const frame = useCurrentFrame();
return (
<Interactive.Div
name="Title"
style={{
opacity: interpolate(frame, [0, 60], [0, 1], {
extrapolateRight: "clamp",
extrapolateLeft: "clamp",
easing: Easing.bezier(0.16, 1, 0.3, 1),
}),
}}
>
Hello World!
</Interactive.Div>
);
};
Keep the interpolate() call inline in the style prop.
Prefer scale, translate, rotate CSS properties over transform.
// 👍 Inline editable keyframes and transform shorthands
style={{
scale: interpolate(frame, [0, 100], [0, 1]),
translate: interpolate(frame, [0, 100], ["0px 0px", "100px 100px"]),
rotate: interpolate(frame, [0, 100], ["20deg", "90deg"]),
}}
// 👎 Hidden values and transform strings become harder to edit in Studio
const scale = interpolate(frame, [0, 100], [0, 1]);
style={{
transform: `scale(${scale})`,
}}
CSS transitions or animations are FORBIDDEN - they will not render correctly.
Tailwind animation class names are FORBIDDEN - they will not render correctly.
Place assets in the public/ folder at your project root.
Use staticFile() to reference files from the public/ folder.
