<h2 id="requiredwidth-width">requiredWidth</h2>

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

```kotlin
public fun SubspaceModifier.requiredWidth(width: Dp): SubspaceModifier
```

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

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