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

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


<h2 id="wrapcontentheight-align-unbounded">wrapContentHeight</h2>

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


```kotlin
fun Modifier.wrapContentHeight(
    align: Alignment.Vertical = Alignment.CenterVertically,
    unbounded: Boolean = false,
) =
    this.then(
        if (align == Alignment.CenterVertically && !unbounded) {
            WrapContentHeightCenter
        } else if (align == Alignment.Top && !unbounded) {
            WrapContentHeightTop
        } else {
            WrapContentElement.height(align, unbounded)
        }
    )
```


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