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
| Name | Type | Required | Description |
|---|---|---|---|
| nodeId | string | Required | A layer inside a frame |
| tracks | array | Required | Up to 16 tracks of { property, keyframes: [{ time, value, easing? }] }, at most 64 keyframes each |
| timelineDuration | number | Optional | Minimum 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.