androidx.compose.foundation.layout

wrapContentSize

Function · from org.jetbrains.compose.foundation:foundation-layout:1.12.2

No hand-written docs yet.

Allow the content to measure at its desired size without regard for the incoming measurement [minimum width]Constraints.minWidth or [minimum height]Constraints.minHeight constraints, and, if unbounded is true, also without regard for the incoming maximum constraints. If the content's measured size is smaller than the minimum size constraint, align it within that minimum sized space. If the content's measured size is larger than the maximum size constraint (only possible when unbounded is true), align within the maximum space.

Parameters

fun Modifier.wrapContentSize(
    align: Alignment = Alignment.Center,
    unbounded: Boolean = false,
)

align: AlignmentOptional

Default: Alignment.Center

Not described.

unbounded: BooleanOptional

Default: false

Not described.

Library docs

Allow the content to measure at its desired size without regard for the incoming measurement [minimum width]Constraints.minWidth or [minimum height]Constraints.minHeight constraints, and, if unbounded is true, also without regard for the incoming maximum constraints. If the content's measured size is smaller than the minimum size constraint, align it within that minimum sized space. If the content's measured size is larger than the maximum size constraint (only possible when unbounded is true), align within the maximum space.

Example usage: