set_auto_layout
Configure auto-layout properties on a Figma frame, including direction, padding, spacing, wrap, and alignment, to keep layouts responsive to content changes.
Instructions
Configure auto-layout properties on a frame in Figma
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"nodeId": "<nodeId>"
},
"name": "set_auto_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Layout direction | |
| nodeId | Yes | The ID of the frame to modify | |
| layoutWrap | No | Wrap behavior for auto-layout | |
| paddingTop | No | Top padding | |
| itemSpacing | No | Spacing between items | |
| paddingLeft | No | Left padding | |
| paddingRight | No | Right padding | |
| paddingBottom | No | Bottom padding | |
| counterAxisSpacing | No | Spacing between wrapped rows/columns | |
| counterAxisAlignItems | No | Counter axis alignment | |
| primaryAxisAlignItems | No | Primary axis alignment |