<h2 id="requireddepth-depth">requiredDepth</h2>

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

```kotlin
public fun SubspaceModifier.requiredDepth(depth: Dp): SubspaceModifier
```

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

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