← Back to Foundation Layout
BoxWithConstraints
Component
in
Foundation Layout
. Since 1.0.0Overview
Examples
Community Notes
A composable that defines its own content according to the available space, based on the incoming constraints or the current LayoutDirection.
Overloads
BoxWithConstraints
@Composable
@UiComposable
fun BoxWithConstraints(
modifier: Modifier = Modifier,
contentAlignment: Alignment = Alignment.TopStart,
propagateMinConstraints: Boolean = false,
content:
@Composable @UiComposable BoxWithConstraintsScope.() -> Unit
)
Parameters
Name | Description |
---|---|
modifier | Modifier to be applied to the layout. |
contentAlignment | The default alignment inside the BoxWithConstraints. |
propagateMinConstraints | Whether the incoming min constraints should be passed to content. |
content | The content of the BoxWithConstraints |
Previous Component← Box
Next ComponentColumn →
