set_autolayout
Configure Flexbox/AutoLayout rules on an existing frame to control direction, padding, gap, alignment, and wrapping.
Instructions
Configure Flexbox/AutoLayout rules (direction, padding, gap, alignment, wrapping) on an existing frame
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>",
"direction": "<direction>"
},
"name": "set_autolayout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wrap | No | Enable multi-line flex wrapping (layoutWrap = 'WRAP') for pill/badge clouds | |
| nodeId | Yes | The Frame node ID to apply AutoLayout to | |
| padding | No | Uniform padding on all sides in pixels | |
| spacing | No | Gap/spacing between child items in pixels | |
| direction | Yes | Layout direction | |
| paddingTop | No | Top padding in pixels | |
| paddingLeft | No | Left padding in pixels | |
| paddingRight | No | Right padding in pixels | |
| paddingBottom | No | Bottom padding in pixels | |
| counterAxisSizing | No | FIXED or AUTO (Hug) | |
| primaryAxisSizing | No | FIXED or AUTO (Hug) | |
| counterAxisSpacing | No | Cross-axis gap between wrapped rows in pixels | |
| counterAxisAlignItems | No | Alignment along the cross axis | |
| primaryAxisAlignItems | No | Alignment along the primary axis |