# SpatialRow

## 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/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)( modifier: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier, verticalAlignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Vertical, depthAlignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Depth, horizontalArrangement: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialArrangement.Horizontal, 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/SpatialRowScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` A layout composable that arranges its children in a horizontal sequence. |

## Functions

### SpatialRow

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/SpatialRow.kt+function:SpatialRow)

```
@Composable
@SubspaceComposable
inline fun SpatialRow(
    modifier: SubspaceModifier = SubspaceModifier,
    verticalAlignment: SpatialAlignment.Vertical = SpatialAlignment.CenterVertically,
    depthAlignment: SpatialAlignment.Depth = SpatialAlignment.CenterDepthwise,
    horizontalArrangement: SpatialArrangement.Horizontal = SpatialArrangement.Center,
    crossinline content: @Composable @SubspaceComposable SpatialRowScope.() -> Unit
): Unit
```

A layout composable that arranges its children in a horizontal sequence. For arranging children vertically, see `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)`.

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

Subspace {
    SpatialRow(
        verticalAlignment = SpatialAlignment.CenterVertically,
        horizontalArrangement = SpatialArrangement.Center,
    ) {
        SpatialPanel(SubspaceModifier.weight(0.3f)) { Text("Left Panel") }
        SpatialPanel(modifier = SubspaceModifier.weight(0.3f)) { Text("Middle Panel") }
        SpatialPanel(modifier = SubspaceModifier.weight(0.3f)) { Text("Right Panel") }
    }
}
```

| Parameters |
|---|---|
| `modifier: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier = SubspaceModifier` | Appearance modifiers to apply to this Composable. |
| `verticalAlignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Vertical = SpatialAlignment.CenterVertically` | The default vertical alignment for child elements within the row. |
| `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 row. |
| `horizontalArrangement: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialArrangement.Horizontal = SpatialArrangement.Center` | The horizontal 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/SpatialRowScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The composable content to be laid out horizontally in the row. |