SimpleGrid

@Composable
fun SimpleGrid(numColumns: ResponsiveValues<Int>, modifier: Modifier = Modifier, variant: CssStyleVariant<SimpleGridKind>? = null, ref: ElementRefScope<HTMLElement>? = null, content: @Composable () -> Unit)(source)

A widget making it easy to create a common case of responsive grids, specifically one where you simply specify the number of columns and then its contents will flow to a new row automatically.

Children of the Grid will be auto-slotted based on how many columns you specified:

SimpleGrid(numColumns(2)) {
Box(...) // Row 0, Col 0
Box(...) // Row 0, Col 1
Box(...) // Row 1, Col 0
}

The numColumns parameter accepts responsive values, so that the behavior can change as the screen size changes:

SimpleGrid(numColumns(2, md = 3)) { ... }

Above, that will create a grid with two columns in smaller layouts (mobile, tablet) and 3 columns in larger ones (desktop).