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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | ||
| rowGap | No | ||
| rowCount | No | ||
| rowSizes | No | ||
| columnGap | No | ||
| columnCount | No | ||
| columnSizes | No | ||
| gridAutoTracks | No | ||
| gridItemsPositioning | No |