ai.to.design is now free.No account needed.Install now →
Docs menu

MCP Tools

set_keyframes

Animate a layer with Figma Motion keyframes.

Writes keyframe tracks for opacity, translateX, translateY, scale, scaleX, scaleY, rotation (clockwise degrees, like CSS), width, height, cornerRadius, fillColor, strokeTrimStart and strokeTrimEnd. strokeTrimStart and strokeTrimEnd take 0–1 along the path and need a vector, line or boolean operation with a visible center-aligned stroke; set on a frame or group, they apply to every eligible stroked path inside. Each keyframe has a time in seconds and an optional easing: a preset (easeOut, gentle, bouncy, …), a cubic-bézier or a spring. A track replaces the layer's existing track for that property.

Parameters

NameTypeRequiredDescription
nodeIdstringRequiredA layer inside a frame
tracksarrayRequiredUp to 16 tracks of { property, keyframes: [{ time, value, easing? }] }, at most 64 keyframes each
timelineDurationnumberOptionalMinimum timeline length in seconds

Example prompt

Try asking: Make the card rise 16px and fade in over 0.4s with a gentle spring.

Tips

  • CSS @keyframes in render_html become keyframes automatically.
  • An easing applies to the segment arriving at its keyframe.