set_auto_layout
Configure auto-layout on a Figma frame or component: set direction, spacing, padding, and alignment to control how child elements stack and distribute.
Instructions
Configure auto-layout direction, spacing, padding, and alignment on a frame or component.
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>",
"layoutMode": "<layoutMode>"
},
"name": "set_auto_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Target frame/component node ID | |
| channel | No | Optional Figma document channel, fileKey, or documentName when multiple Figma files are open | |
| layoutMode | Yes | ||
| layoutWrap | No | ||
| paddingTop | No | ||
| itemSpacing | No | ||
| paddingLeft | No | ||
| paddingRight | No | ||
| paddingBottom | No | ||
| counterAxisAlignItems | No | ||
| primaryAxisAlignItems | No |