set_layout_sizing
Set hug, fill, or fixed sizing on a Figma node via horizontal/vertical sizing or width/height aliases. For TEXT nodes, add textAutoResize to keep wrap mode aligned.
Instructions
Set hug/fill/fixed sizing. Prefer layoutSizingHorizontal/Vertical or width/height aliases with FIXED | HUG | FILL. For TEXT nodes you can also pass textAutoResize (WIDTH_AND_HEIGHT | HEIGHT | NONE | TRUNCATE) so wrap mode stays aligned with sizing.
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_layout_sizing"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Alias for layoutSizingHorizontal: FIXED | HUG | FILL | |
| height | No | Alias for layoutSizingVertical: FIXED | HUG | FILL | |
| nodeId | Yes | ||
| textAutoResize | No | TEXT only: WIDTH_AND_HEIGHT | HEIGHT | NONE | TRUNCATE | |
| layoutSizingVertical | No | ||
| counterAxisSizingMode | No | ||
| primaryAxisSizingMode | No | ||
| layoutSizingHorizontal | No |