<h2 id="requireddepthin-min-max">requiredDepthIn</h2>

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

```kotlin
public fun SubspaceModifier.requiredDepthIn(
    min: Dp = Dp.Unspecified,
    max: Dp = Dp.Unspecified,
): SubspaceModifier
```

Constrain the depth of the content to be between `min` dp and `max` dp, disregarding the incoming
measurement [VolumeConstraints](/jetpack-compose/androidx.xr.compose/compose/classes/VolumeConstraints).

This is in contrast to [SubspaceModifier.depthIn](/jetpack-compose/androidx.xr.compose/compose/functions/depthIn), which respects the parent's constraints.
`requiredDepthIn` will ignore the `minDepth` and `maxDepth` from the incoming constraints.

#### Parameters

| | |
| --- | --- |
| min | The minimum depth. |
| max | The maximum depth. |