State of Compose 2023 results are in! Click here to learn more

← Back to Compose UI

WithConstraints

Component
in
Compose UI
. Since 0.1.0-dev15

Overview

Code Examples

A composable that defines its own content according to the available space, based on the incoming constraints or the current LayoutDirection.

Overloads

WithConstraints

@Composable
fun WithConstraints(
    modifier: Modifier = Modifier,
    content: @Composable WithConstraintsScope.() -> Unit
)

Parameters

NameDescription
modifierModifier to be applied to the introduced layout