<h2 id="constrainheight-height">constrainHeight</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public fun VolumeConstraints.constrainHeight(height: Int): Int
```

Constrains a given height value to fit within the bounds of this [VolumeConstraints](/jetpack-compose/androidx.xr.compose/compose/classes/VolumeConstraints) object.

#### Parameters

| | |
| --- | --- |
| height | the height value to constrain. |

#### Returns

| | |
| --- | --- |
|  | the constrained height value, ensuring it's within the minimum and maximum height bounds. |