Loading...
Loading...
Best practices for writing Remotion animations that stay intuitive for coding agents and remain editable in Remotion Studio Visual Mode — keeping values literal and inline where the Studio can find them, rather than hidden behind indirection. Use when writing or refactoring a Remotion composition, or when an animation is correct in code but not editable in the Studio. Triggers - Remotion Studio, Visual Mode, editable animation, interpolate, spring, composition props.
npx skill4agent add shadcn-labs/snapcn interactivity-best-practicesinterpolate()spring()interpolate()interpolate()interpolate()Easing.spring()style={{
scale: interpolate(frame, [0, 30], [0, 1], {
easing: Easing.spring({
damping: 200,
}),
}),
}}spring()interpolate()const scale = spring({
frame,
fps,
config: {
damping: 200,
},
});
style={{
scale,
}}Easing.spring()dampingmassstiffnessovershootClampingframefpsfromtodelayreversedurationInFramesdurationRestThresholdspring()interpolate()scalerotatetranslatetransformstyle={{
scale: interpolate(frame, [0, 100], [0, 2]),
}}style={{
transform: `scale(${interpolate(frame, [0, 100], [0, 2])})`,
}}transformstyle={{
scale: interpolate(frame, [0, 100], [0, 2]),
}}const scale = interpolate(frame, [0, 100], [0, 2]);
style={{
scale,
}}effects={[
radialProgressiveBlur({
center: [0.5, 0.5],
point1: [0.86, 0.36],
point2: [0.68, 0.84],
}),
]}const center = [0.5, 0.5] as const;
effects={[
radialProgressiveBlur({
center,
}),
]}effects<CanvasImage src={src} width={1280} height={720} />
<CanvasImage
src={src}
width={1280}
height={720}
effects={[
blur({
radius: interpolate(frame, [0, 100], [0, 40]),
}),
]}
/><CanvasImage
src={src}
width={1280}
height={720}
effects={enabled ? [blur({radius: 40})] : []}
/>rotatetranslatestyle={{
rotate: interpolate(frame, [0, 100], ["20deg", "90deg"]),
translate: interpolate(frame, [0, 100], ["0px 0px", "100px 100px"]),
}}Interactive.*Interactiveremotionimport {Interactive} from "remotion";<Interactive.Div
style={{
color: "red",
fontSize: 80,
}}
>
Hello
</Interactive.Div><Interactive.Div><Interactive.Span>Interactive.*