set_grid_layout
Convert a Figma frame into a GRID auto-layout container, then set row/column counts, gaps, and fixed, flex, or hug track sizes.
Instructions
Turn a frame into a GRID auto-layout container and configure it. GRID is a third layoutMode alongside HORIZONTAL/VERTICAL: children occupy cells rather than a single flow. Set rowCount/columnCount and the gaps, and optionally size individual tracks via rowSizes/columnSizes — each entry is a number (a FIXED px size) or {type:'FLEX'|'FIXED'|'HUG', value}. FLEX tracks share leftover space by their value as a weight. Position children afterwards with set_grid_child_position.
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_grid_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | ||
| rowGap | No | ||
| rowCount | No | ||
| rowSizes | No | ||
| columnGap | No | ||
| columnCount | No | ||
| columnSizes | No | ||
| gridAutoTracks | No | ||
| gridItemsPositioning | No |