# SpatialRowScope

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+class:androidx.xr.compose.subspace.SpatialRowScope) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)


```
@LayoutScopeMarker
interface SpatialRowScope
```

<br />

*** ** * ** ***

Scope for customizing the layout of children within a `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)`.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier.https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialRowScope#(androidx.xr.compose.subspace.layout.SubspaceModifier).align(androidx.xr.compose.subspace.layout.SpatialAlignment.Depth)(alignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Depth)` Aligns the element depthwise within the `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)`, overriding the row's default depth alignment. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier.https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialRowScope#(androidx.xr.compose.subspace.layout.SubspaceModifier).align(androidx.xr.compose.subspace.layout.SpatialAlignment.Vertical)(alignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Vertical)` Aligns the element vertically within the `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)`, overriding the row's default vertical alignment. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier.https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialRowScope#(androidx.xr.compose.subspace.layout.SubspaceModifier).weight(kotlin.Float,kotlin.Boolean)( weight: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, fill: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Sizes the element's width proportionally to its `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialRowScope#(androidx.xr.compose.subspace.layout.SubspaceModifier).weight(kotlin.Float,kotlin.Boolean)` relative to other weighted sibling elements in the `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)`. |

## Public functions

### SubspaceModifier.align

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:align) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun SubspaceModifier.align(alignment: SpatialAlignment.Depth): SubspaceModifier
```

Aligns the element depthwise within the `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)`, overriding the row's default depth alignment.

| Parameters |
|---|---|
| `alignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Depth` | The depth alignment to apply. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier` | The modified `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier`. |

### SubspaceModifier.align

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:align) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun SubspaceModifier.align(alignment: SpatialAlignment.Vertical): SubspaceModifier
```

Aligns the element vertically within the `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)`, overriding the row's default vertical alignment.

| Parameters |
|---|---|
| `alignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Vertical` | The vertical alignment to apply. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier` | The modified `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier`. |

### SubspaceModifier.weight

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:weight) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun SubspaceModifier.weight(
    weight: @FloatRange(from = 0.0, fromInclusive = false) Float,
    fill: Boolean = true
): SubspaceModifier
```

Sizes the element's width proportionally to its `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialRowScope#(androidx.xr.compose.subspace.layout.SubspaceModifier).weight(kotlin.Float,kotlin.Boolean)` relative to other weighted sibling elements in the `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)`.

The parent divides the remaining horizontal space after measuring unweighted children and distributes it according to the weights.

If `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialRowScope#(androidx.xr.compose.subspace.layout.SubspaceModifier).weight(kotlin.Float,kotlin.Boolean)` is true, the element will occupy its entire allocated width. Otherwise, it can be smaller, potentially making the `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)` smaller as unused space isn't redistributed.

| Parameters |
|---|---|
| `weight: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The proportional width for this element relative to other weighted siblings. Must be positive. |
| `fill: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | Whether the element should fill its entire allocated width. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier` | The modified `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SubspaceModifier`. |