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

```kotlin
@LayoutScopeMarker
public interface SpatialRowScope
```

Scope for customizing the layout of children within a [SpatialRow](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialRow).

## Functions

<h2 id="weight-fill">weight</h2>

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

Sizes the element's width proportionally to its [weight](/jetpack-compose/androidx.wear.compose/compose-foundation/functions/weight) relative to other weighted sibling
elements in the [SpatialRow](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialRow).

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

If [fill](/jetpack-compose/androidx.compose.ui/ui-graphics/objects/Fill) is true, the element will occupy its entire allocated width. Otherwise, it can be
smaller, potentially making the [SpatialRow](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialRow) smaller as unused space isn't redistributed.

#### Parameters

| | |
| --- | --- |
| weight | The proportional width for this element relative to other weighted siblings. Must be positive. |
| fill | Whether the element should fill its entire allocated width. |

#### Returns

| | |
| --- | --- |
|  | The modified [SubspaceModifier](/jetpack-compose/androidx.xr.compose/compose/interfaces/SubspaceModifier). |

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

<h2 id="align-alignment">align</h2>

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

Aligns the element vertically within the [SpatialRow](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialRow), overriding the row's default vertical
alignment.

#### Parameters

| | |
| --- | --- |
| alignment | The vertical alignment to apply. |

#### Returns

| | |
| --- | --- |
|  | The modified [SubspaceModifier](/jetpack-compose/androidx.xr.compose/compose/interfaces/SubspaceModifier). |

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

<h2 id="align-alignment-2">align</h2>

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

Aligns the element depthwise within the [SpatialRow](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialRow), overriding the row's default depth
alignment.

#### Parameters

| | |
| --- | --- |
| alignment | The depth alignment to apply. |

#### Returns

| | |
| --- | --- |
|  | The modified [SubspaceModifier](/jetpack-compose/androidx.xr.compose/compose/interfaces/SubspaceModifier). |