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

```kotlin
public object SpatialArrangement
```

Used to specify the arrangement of the layout's children in layouts like [SpatialRow](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialRow) or
[SpatialColumn](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialColumn) in the main axis direction (horizontal and vertical, respectively).

[SpatialRow](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialRow) supports horizontal arrangements similar to [Row](/jetpack-compose/androidx.compose.foundation/foundation-layout/composable-functions/Row): ![Row
arrangements](https://developer.android.com/images/reference/androidx/compose/foundation/layout/row_arrangement_visualization.gif)

[SpatialColumn](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialColumn) supports horizontal arrangements similar to [Column](/jetpack-compose/androidx.compose.foundation/foundation-layout/composable-functions/Column): ![Column
arrangements](https://developer.android.com/images/reference/androidx/compose/foundation/layout/column_arrangement_visualization.gif)

## Functions

<h2 id="spacedby-space">spacedBy</h2>

```kotlin
public fun spacedBy(space: Dp): AxisIndependent
```

Children are placed next to each other with fixed `space` between them along the main axis.

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

<h2 id="spacedby-space-spatialalignment">spacedBy</h2>

```kotlin
public fun spacedBy(space: Dp, spatialAlignment: SpatialAlignment.Horizontal): Horizontal
```

Children are placed next to each other with fixed `space` between them horizontally and
aligned them according to the [spatialAlignment](/jetpack-compose/androidx.xr.compose/compose/interfaces/SpatialAlignment) given.

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

<h2 id="spacedby-space-spatialalignment-2">spacedBy</h2>

```kotlin
public fun spacedBy(space: Dp, spatialAlignment: SpatialAlignment.Vertical): Vertical
```

Children are placed next to each other with fixed `space` between them vertically and align
them according to the [spatialAlignment](/jetpack-compose/androidx.xr.compose/compose/interfaces/SpatialAlignment) given.

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

<h2 id="aligned-spatialalignment">aligned</h2>

```kotlin
public fun aligned(spatialAlignment: SpatialAlignment.Horizontal): Horizontal
```

Children placed next to each other horizontally and align them according to the
[spatialAlignment](/jetpack-compose/androidx.xr.compose/compose/interfaces/SpatialAlignment) given.

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

<h2 id="aligned-spatialalignment-2">aligned</h2>

```kotlin
public fun aligned(spatialAlignment: SpatialAlignment.Vertical): Vertical
```

Children placed next to each other vertically and align them according to the
[spatialAlignment](/jetpack-compose/androidx.xr.compose/compose/interfaces/SpatialAlignment).