grid

fun grid(columns: Int, spacing: Dp = Dp.Zero, block: GridScope.() -> Unit)

Appends a uniform grid: children added inside block flow row-major into columns equal-width cells. The last row is padded with empty cells so every column keeps the same width.

Sugar over nested column / row / weighted slots — grid cells can hold any node, including cards and images.

Parameters

columns

number of cells per row; must be positive.

spacing

gap inserted both between rows and between columns.