<h2 id="requiredheight-height">requiredHeight</h2>

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

```kotlin
public fun SubspaceModifier.requiredHeight(height: Dp): SubspaceModifier
```

Declare the size of the content to be exactly [height](/jetpack-compose/androidx.xr.compose/compose/functions/height) dp along the y dimension, disregarding the
incoming [VolumeConstraints](/jetpack-compose/androidx.xr.compose/compose/classes/VolumeConstraints).

This is in contrast to [SubspaceModifier.height](/jetpack-compose/androidx.xr.compose/compose/functions/height), which respects the parent's constraints.
`requiredHeight` will ignore the `minHeight` and `maxHeight` from the incoming constraints, which
can be useful for sizing an element to a specific value even if it exceeds the parent's bounds.