set_auto_layout
Enable auto-layout on a Figma frame and configure direction, spacing, padding, alignment, wrapping, and sizing. Set direction to NONE to disable layout.
Instructions
Enable auto-layout on a frame and configure direction, spacing, padding, and alignment. Set direction to NONE to disable auto-layout.
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 |
|---|---|---|---|
| wrap | No | Enable wrapping (WRAP) | |
| nodeId | Yes | Figma node ID | |
| padding | No | Padding — single number (all sides) or {top, right, bottom, left} | |
| spacing | No | Gap between children in pixels | |
| direction | No | Layout direction | HORIZONTAL |
| counterAxisAlign | No | Alignment along cross axis | MIN |
| primaryAxisAlign | No | Alignment along main axis | MIN |
| counterAxisSizingMode | No | Sizing along cross axis — FIXED holds the frame size, AUTO hugs children (default AUTO) | |
| primaryAxisSizingMode | No | Sizing along main axis — FIXED holds the frame size, AUTO hugs children (default AUTO) |