androidx.compose.foundation.layout
width
Function · from org.jetbrains.compose.foundation:foundation-layout:1.12.2
No hand-written docs yet.
Declare the preferred width of the content to be the same as the min or max intrinsic width of the content. The incoming measurement Constraints may override this value, forcing the content to be either smaller or larger.
With intrinsicSize
fun Modifier.width(intrinsicSize: IntrinsicSize)
intrinsicSize: IntrinsicSizeRequired
intrinsicSize: IntrinsicSizeRequiredNot described.
With width
fun Modifier.width(width: Dp)
width: DpRequired
width: DpRequiredNot described.
Library docs
Declare the preferred width of the content to be the same as the min or max intrinsic width of
the content. The incoming measurement Constraints may override this value, forcing the content
to be either smaller or larger.
See height for options of sizing to intrinsic height. Also see width and widthIn for other
options to set the preferred width.
Example usage for min intrinsic: