MCP Tools
set_keyframes
Animate a layer with Figma Motion keyframes.
Writes keyframe tracks for opacity, translateX/Y, scale, scaleX/Y, rotation (clockwise degrees, like CSS), width, height, cornerRadius and fillColor. 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.