# BiasAlignment

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/Alignment.kt+class:androidx.compose.ui.BiasAlignment) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  data class BiasAlignment : Alignment
  ```

*** ** * ** ***

An `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment` specified by bias: for example, a bias of -1 represents alignment to the start/top, a bias of 0 will represent centering, and a bias of 1 will represent end/bottom. Any value can be specified to obtain an alignment. Inside the -1, 1 range, the obtained alignment will position the aligned size fully inside the available space, while outside the range it will the aligned size will be positioned partially or completely outside.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/BiasAbsoluteAlignment` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment` |   |

## Summary

| ### Nested types |
|---|
| `data class https://developer.android.com/reference/kotlin/androidx/compose/ui/BiasAlignment.Horizontal : https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal` An `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal` specified by bias: for example, a bias of -1 represents alignment to the start, a bias of 0 will represent centering, and a bias of 1 will represent end. |
| `data class https://developer.android.com/reference/kotlin/androidx/compose/ui/BiasAlignment.Vertical : https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Vertical` An `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Vertical` specified by bias: for example, a bias of -1 represents alignment to the top, a bias of 0 will represent centering, and a bias of 1 will represent bottom. |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/BiasAlignment#BiasAlignment(kotlin.Float,kotlin.Float)(horizontalBias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, verticalBias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` | Cmn |

| ### Public functions |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/BiasAlignment#align(androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.LayoutDirection)(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize, space: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize, layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection)` Calculates the position of a box of size `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#align(androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.LayoutDirection)` relative to the top left corner of an area of size `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#align(androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.LayoutDirection)`. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/BiasAlignment#horizontalBias()` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/BiasAlignment#verticalBias()` | Cmn |

## Public constructors

### BiasAlignment

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

```
BiasAlignment(horizontalBias: Float, verticalBias: Float)
```

## Public functions

### align

Cmn

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

Calculates the position of a box of size `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#align(androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.LayoutDirection)` relative to the top left corner of an area of size `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#align(androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.LayoutDirection)`. The returned offset can be negative or larger than `space - size`, meaning that the box will be positioned partially or completely outside the area.

## Public properties

### horizontalBias

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

```
val horizontalBias: Float
```

### verticalBias

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

```
val verticalBias: Float
```