Google is committed to advancing racial equity for Black communities. See how.


interface LayoutModifier : Modifier.Element

A Modifier.Element that changes how its wrapped content is measured and laid out. It has the same measurement and layout functionality as the androidx.compose.ui.layout.Layout component, while wrapping exactly one layout due to it being a modifier. In contrast, the androidx.compose.ui.layout.Layout component is used to define the layout behavior of multiple children.


Public methods
open Int

The lambda used to calculate IntrinsicMeasurable.maxIntrinsicHeight.

open Int

The function used to calculate IntrinsicMeasurable.maxIntrinsicWidth.

abstract MeasureResult
MeasureScope.measure(measurable: Measurable, constraints: Constraints)

The function used to measure the modifier.

open Int

The lambda used to calculate IntrinsicMeasurable.minIntrinsicHeight.

open Int

The function used to calculate IntrinsicMeasurable.minIntrinsicWidth.

Inherited functions
Inherited extension functions
Modifier.absoluteOffset(x: Dp = 0.dp, y: Dp = 0.dp)

Offset the content by (x dp, y dp).


Offset the content by offset px.

Modifier.absoluteOffsetPx(x: State<Float> = mutableStateOf(0f), y: State<Float> = mutableStateOf(0f))

Modifier.absolutePadding(left: Dp = 0.dp, top: Dp = 0.dp, right: Dp = 0.dp, bottom: Dp = 0.dp)

Apply additional space along each edge of the content in Dp: left, top, right and bottom.

Modifier.aspectRatio(@FloatRange(0.0, 3.4E38, false) ratio: Float, matchHeightConstraintsFirst: Boolean = false)

Attempts to size the content to match a specified aspect ratio by trying to match one of the incoming constraints in the following order: Constraints.maxWidth, Constraints.maxHeight, Constraints.minWidth, Constraints.minHeight if matchHeightConstraintsFirst is false (which is the default), or Constraints.maxHeight, Constraints.maxWidth, Constraints.minHeight, Constraints.minWidth if matchHeightConstraintsFirst is true.

Modifier.defaultMinSizeConstraints(minWidth: Dp = Dp.Unspecified, minHeight: Dp = Dp.Unspecified)

Constrain the size of the wrapped layout only when it would be otherwise unconstrained: the minWidth and minHeight constraints are only applied when the incoming corresponding constraint is 0.

Modifier.fillMaxHeight(@FloatRange(0.0, 1.0) fraction: Float = 1f)

Have the content fill (possibly only partially) the Constraints.maxHeight of the incoming measurement constraints, by setting the minimum height and the maximum height to be equal to the maximum height multiplied by fraction.

Modifier.fillMaxSize(@FloatRange(0.0, 1.0) fraction: