<div class='type'>Compose Modifier</div>

<a id='references'></a>


<h2 id="wrapcontentwidth-align-unbounded">wrapContentWidth</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Modifier.wrapContentWidth(
    align: Alignment.Horizontal = Alignment.CenterHorizontally,
    unbounded: Boolean = false,
) =
    this.then(
        if (align == Alignment.CenterHorizontally && !unbounded) {
            WrapContentWidthCenter
        } else if (align == Alignment.Start && !unbounded) {
            WrapContentWidthStart
        } else {
            WrapContentElement.width(align, unbounded)
        }
    )
```


Allow the content to measure at its desired width without regard for the incoming measurement
`minimum width constraint`, and, if `unbounded` is true, also without
regard for the incoming measurement `maximum width constraint`. 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.