<h2 id="requiredwidthin-min-max">requiredWidthIn</h2>

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

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

Constrain the width 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.widthIn](/jetpack-compose/androidx.xr.compose/compose/functions/widthIn), which respects the parent's constraints.
`requiredWidthIn` will ignore the `minWidth` and `maxWidth` from the incoming constraints.

#### Parameters

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