# SpatialAlignment.Vertical

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


```
interface SpatialAlignment.Vertical
```

<br />

Known direct subclasses [SpatialBiasAlignment.Vertical](https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Vertical)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Vertical` | Creates a weighted alignment that specifies a vertical bias. |

*** ** * ** ***

An interface to calculate the alignment of a box of a certain size inside an available height.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialAlignment.Vertical#align(kotlin.Int,kotlin.Int)(size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, space: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Provides the vertical alignment offset from the origin of the space to the origin of the content. |

## Public functions

### align

Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun align(size: Int, space: Int): Int
```

Provides the vertical alignment offset from the origin of the space to the origin of the content.

| Parameters |
|---|---|
| `size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The content size in pixels. |
| `space: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The available space in pixels. |