# SpatialColumn

## Functions summary

|---|---|
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SubspaceComposable https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialColumn.composable#SpatialColumn(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialAlignment.Horizontal,androidx.xr.compose.subspace.layout.SpatialAlignment.Depth,androidx.xr.compose.subspace.layout.SpatialArrangement.Vertical,kotlin.Function1)( modifier: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier, horizontalAlignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Horizontal, depthAlignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Depth, verticalArrangement: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialArrangement.Vertical, crossinline content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SubspaceComposable https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialColumnScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` A layout composable that arranges its children in a vertical sequence. |

## Functions

### SpatialColumn

Artifact: [androidx.xr.compose:compose](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/subspace/SpatialColumn.kt+function:SpatialColumn)

```
@Composable
@SubspaceComposable
inline fun SpatialColumn(
    modifier: SubspaceModifier = SubspaceModifier,
    horizontalAlignment: SpatialAlignment.Horizontal = SpatialAlignment.CenterHorizontally,
    depthAlignment: SpatialAlignment.Depth = SpatialAlignment.CenterDepthwise,
    verticalArrangement: SpatialArrangement.Vertical = SpatialArrangement.Center,
    crossinline content: @Composable @SubspaceComposable SpatialColumnScope.() -> Unit
): Unit
```

A layout composable that arranges its children in a vertical sequence.

For arranging children horizontally, see `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialRow.composable#SpatialRow(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialAlignment.Vertical,androidx.xr.compose.subspace.layout.SpatialAlignment.Depth,androidx.xr.compose.subspace.layout.SpatialArrangement.Horizontal,kotlin.Function1)`.

```kotlin
import androidx.compose.material3.Text
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialColumn
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SpatialAlignment
import androidx.xr.compose.subspace.layout.SpatialArrangement
import androidx.xr.compose.subspace.layout.SubspaceModifier

Subspace {
    SpatialColumn(
        horizontalAlignment = SpatialAlignment.CenterHorizontally,
        verticalArrangement = SpatialArrangement.Center,
    ) {
        SpatialPanel(SubspaceModifier.weight(0.3f)) { Text("Top Panel") }
        SpatialPanel(SubspaceModifier.weight(0.3f)) { Text("Middle Panel") }
        SpatialPanel(SubspaceModifier.weight(0.3f)) { Text("Bottom Panel") }
    }
}
```

| Parameters |
|---|---|
| `modifier: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier = SubspaceModifier` | Modifiers to apply to the layout. |
| `horizontalAlignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Horizontal = SpatialAlignment.CenterHorizontally` | The default horizontal alignment for child elements within the column. |
| `depthAlignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Depth = SpatialAlignment.CenterDepthwise` | The default depth alignment for child elements within the column. |
| `verticalArrangement: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialArrangement.Vertical = SpatialArrangement.Center` | The vertical arrangement of the children. |
| `crossinline content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SubspaceComposable https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialColumnScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The composable content to be laid out vertically. |