androidx.compose.foundation.layout

wrapContentWidth

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

No hand-written docs yet.

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

Parameters

fun Modifier.wrapContentWidth(
    align: Alignment.Horizontal = Alignment.CenterHorizontally,
    unbounded: Boolean = false,
)

align: Alignment.HorizontalOptional

Default: Alignment.CenterHorizontally

Not described.

unbounded: BooleanOptional

Default: false

Not described.

Library docs

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

Example usage: