<h2 id="requiredsizein-minwidth-maxwidth-minheight-maxheight-mindepth-maxdepth">requiredSizeIn</h2>

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

```kotlin
public fun SubspaceModifier.requiredSizeIn(
    minWidth: Dp = Dp.Unspecified,
    maxWidth: Dp = Dp.Unspecified,
    minHeight: Dp = Dp.Unspecified,
    maxHeight: Dp = Dp.Unspecified,
    minDepth: Dp = Dp.Unspecified,
    maxDepth: Dp = Dp.Unspecified,
): SubspaceModifier
```

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

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

#### Parameters

| | |
| --- | --- |
| minWidth | The minimum width. |
| maxWidth | The maximum width. |
| minHeight | The minimum height. |
| maxHeight | The maximum height. |
| minDepth | The minimum depth. |
| maxDepth | The maximum depth. |