FlowRow

fun UiScope.FlowRow(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, horizontalSpacing: Int = 0, verticalSpacing: Int = 0, horizontalArrangement: Arrangement = Arrangement.Start, verticalAlignment: VerticalAlignment = VerticalAlignment.Top, content: FlowRowScope.() -> Unit)(source)

Emits horizontal children that wrap into rows when their measured widths and gaps exceed a bounded width.

Children are measured once with zero minimums and the full incoming maximums, never the remaining row width. Exact fits remain in the current row; an unbounded width produces one row. The constrained natural size uses the widest row and the sum of row heights and vertical gaps. Use a sizing modifier to fill the available width; rows are arranged within the resulting container width and stacked from the top. Children keep their logical parent across reflow, and paint or input overflow is not implicitly clipped. The callback scope is confined to the constructing thread and is closed immediately after the callback returns.

Parameters

modifier

ordered active behavior applied to the flow row itself.

key

optional stable identity among direct siblings.

horizontalSpacing

non-negative fixed spacing between children in the same row.

verticalSpacing

non-negative fixed spacing between rows.

horizontalArrangement

horizontal slack distribution applied separately to every row.

verticalAlignment

default child placement within the maximum measured height of its row.

content

callback that emits zero or more direct children.

Throws

when the enclosing scope has escaped its callback or constructing thread.

when either spacing value is negative.

when content fails; the exact callback failure is propagated.