gridItemsPositioning
Applicable only on auto-layout frames with layoutMode set to "GRID".
Controls how children are positioned within the grid.
Signature
gridItemsPositioning: 'MANUAL' | 'ROW_AUTO_FLOW'
Remarks
"MANUAL"(default): children stay at the grid cell they are placed in. UsesetGridChildPositionorappendChildAtto position children explicitly."ROW_AUTO_FLOW": children are placed by layer order into the next available cell in row-major order (left to right, top to bottom), similar to CSSgrid-auto-flow: row. CallingsetGridChildPositionwill throw an error in this mode — reorder children usinginsertChildinstead.
Grid with automatic item positioning
const grid = figma.createFrame()
grid.layoutMode = 'GRID'
grid.gridColumnCount = 2
grid.gridAutoTracks = 'ROWS'
grid.gridItemsPositioning = 'ROW_AUTO_FLOW'
const a = figma.createFrame()
const b = figma.createFrame()
const c = figma.createFrame()
grid.appendChild(a)
grid.appendChild(b)
grid.appendChild(c)
// Children flow automatically:
// + --- + --- +
// | a | b |
// + --- + --- +
// | c | |
// + --- + --- +