# SpatialBiasAlignment.Horizontal

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


```
class SpatialBiasAlignment.Horizontal : SpatialAlignment.Horizontal
```

<br />

*** ** * ** ***

Creates a weighted alignment that specifies a horizontal bias.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Horizontal#Horizontal(kotlin.Float)(horizontalBias: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = -1.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Horizontal#align(kotlin.Int,kotlin.Int,androidx.compose.ui.unit.LayoutDirection)(size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, space: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection)` Provides the horizontal alignment offset from the origin of the space to the origin of the content. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Horizontal` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Horizontal#copy(kotlin.Float)(bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Horizontal#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Horizontal#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Horizontal#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialBiasAlignment.Horizontal#horizontalBias()` Must be within the range of -1, 1 with -1 being start and 1 being end. |

## Public constructors

### Horizontal

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

```
Horizontal(horizontalBias: @FloatRange(from = -1.0, to = 1.0) Float)
```

| Parameters |
|---|---|
| `horizontalBias: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = -1.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Must be within the range of -1, 1 with -1 being start and 1 being end. |

## Public functions

### align

```
open fun align(size: Int, space: Int, layoutDirection: LayoutDirection): Int
```

Provides the horizontal 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. |
| `layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` | LTR or RTL. |

### copy

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

```
fun copy(bias: Float = this.horizontalBias): SpatialBiasAlignment.Horizontal
```

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### horizontalBias

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

```
val horizontalBias: Float
```

Must be within the range of -1, 1 with -1 being start and 1 being end.