<h2 id="offset-horizontal-vertical-depth-resetmins">offset</h2>

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

```kotlin
public fun VolumeConstraints.offset(
    horizontal: Int = 0,
    vertical: Int = 0,
    depth: Int = 0,
    resetMins: Boolean = false,
): VolumeConstraints
```

Creates a new [VolumeConstraints](/jetpack-compose/androidx.xr.compose/compose/classes/VolumeConstraints) object by offsetting the minimum and maximum values of this
one.

#### Parameters

| | |
| --- | --- |
| horizontal | the horizontal offset to apply. |
| vertical | the vertical offset to apply. |
| depth | the depth offset to apply. |
| resetMins | if true, the minimum values in the new constraints will be set to 0, otherwise. they will be offset. |

#### Returns

| | |
| --- | --- |
|  | a new [VolumeConstraints](/jetpack-compose/androidx.xr.compose/compose/classes/VolumeConstraints) object with offset values. |

<hr class="docs-overload-divider">

<h2 id="offset-x-y-z">offset</h2>

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

```kotlin
public fun SubspaceModifier.offset(x: Dp = 0.dp, y: Dp = 0.dp, z: Dp = 0.dp): SubspaceModifier
```

Offset the content by (`x` dp, `y` dp, `z` dp). The offsets can be positive as well as
non-positive.

This modifier will automatically adjust the horizontal offset according to the layout direction:
when the layout direction is LTR, positive `x` offsets will move the content to the right and
when the layout direction is RTL, positive `x` offsets will move the content to the left. For a
modifier that offsets without considering layout direction, see [absoluteOffset](/jetpack-compose/androidx.xr.compose/compose/functions/absoluteOffset).