# Arrangement.Horizontal

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

  ```
  interface Arrangement.Horizontal
  ```
Known direct subclasses [Arrangement.HorizontalOrVertical](https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical` | Used to specify the horizontal arrangement of the layout's children in horizontal layouts like `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Row.composable#Row(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,kotlin.Function1)`, or the vertical arrangement of the layout's children in vertical layouts like `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Column.composable#Column(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,kotlin.Function1)`. |

*** ** * ** ***

Used to specify the horizontal arrangement of the layout's children in layouts like `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Row.composable#Row(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,kotlin.Function1)`.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density.https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.Horizontal#(androidx.compose.ui.unit.Density).arrange(kotlin.Int,kotlin.IntArray,androidx.compose.ui.unit.LayoutDirection,kotlin.IntArray)( totalSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, sizes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html, layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection, outPositions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html )` Horizontally places the layout children. | Cmn |

| ### Public properties |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.Horizontal#spacing()` Spacing that should be added between any two adjacent layout children. | Cmn |

## Public functions

### Density.arrange

Cmn Artifact: [androidx.compose.foundation:foundation-layout](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/layout/Arrangement.kt+function:arrange) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

```
fun Density.arrange(
    totalSize: Int,
    sizes: IntArray,
    layoutDirection: LayoutDirection,
    outPositions: IntArray
): Unit
```

Horizontally places the layout children.

| Parameters |
|---|---|
| `totalSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Available space that can be occupied by the children, in pixels. |
| `sizes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` | An array of sizes of all children, in pixels. |
| `layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` | A layout direction, left-to-right or right-to-left, of the parent layout that should be taken into account when determining positions of the children. |
| `outPositions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` | An array of the size of `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.Horizontal#(androidx.compose.ui.unit.Density).arrange(kotlin.Int,kotlin.IntArray,androidx.compose.ui.unit.LayoutDirection,kotlin.IntArray)` that returns the calculated positions relative to the left, in pixels. |

## Public properties

### spacing

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

```
open val spacing: Dp
```

Spacing that should be added between any two adjacent layout children.