Set auto layout on a frame
figma_set_auto_layoutSet auto layout on a Figma frame, specifying direction, spacing, padding, and alignment. Pass mode NONE to disable; only named properties change.
Instructions
Turns auto layout on for a frame and sets its direction, spacing, padding and alignment. Pass mode "NONE" to turn it off. Only the properties you name are changed.
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>",
"mode": "<mode>"
},
"name": "figma_set_auto_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Layout direction. | |
| nodeId | Yes | The frame, component or instance to lay out. | |
| padding | No | Shorthand: sets all four paddings. | |
| paddingTop | No | ||
| itemSpacing | No | Gap between children. | |
| paddingLeft | No | ||
| paddingRight | No | ||
| paddingBottom | No | ||
| counterAxisAlignItems | No | Alignment across the layout direction. | |
| primaryAxisAlignItems | No | Alignment along the layout direction. |