Stack

fun UiScope.Stack(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, contentAlignment: Alignment = Alignment.TopStart, content: StackScope.() -> Unit)(source)

Emits one overlay stack with the descriptions produced by its callback.

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 stack itself, including sizing, padding, paint, semantics, focus, and input behavior.

key

optional stable identity among direct siblings.

contentAlignment

default two-axis child alignment.

content

callback that emits zero or more direct children.

Throws

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

when content fails; the exact callback failure is propagated.