---
title: "FlexAlignContent"
description: "Distributes flex lines along the cross axis."
type: "class"
lastmod: "2026-10-07"
---
## API Reference

> Source set: Common

```kotlin
public class FlexAlignContent @PublishedApi internal constructor(private val bits: Int)
```

Distributes flex lines along the cross axis.

Only applies when `FlexBoxConfigScope.wrap` is `FlexWrap.Wrap` or `FlexWrap.WrapReverse`,
multiple lines exist, and the container has extra cross-axis space. Distributes and expands flex
lines along the cross axis. Items within each line follow [FlexAlignItems](/jetpack-compose/androidx.compose.foundation/foundation-layout/classes/FlexAlignItems/api) or [FlexAlignSelf](/jetpack-compose/androidx.compose.foundation/foundation-layout/classes/FlexAlignSelf/api) and
do not stretch unless configured with `FlexAlignItems.Stretch` or `FlexAlignSelf.Stretch`.

## Functions

### toString

> Source set: Common

```kotlin
override fun toString(): String
```

## Members

### Companion

> Source set: Common

```kotlin
public companion object
```

## Properties

### Start

> Source set: Common

```kotlin
public inline val Start: FlexAlignContent
```

Place lines such that they are as close as possible to the `cross-start` edge of the
container.

### End

> Source set: Common

```kotlin
public inline val End: FlexAlignContent
```

Place lines such that they are as close as possible to the `cross-end` edge of the
container.

### Center

> Source set: Common

```kotlin
public inline val Center: FlexAlignContent
```

Place lines such that they are as close as possible to the middle of the container's
cross axis.

### Stretch

> Source set: Common

```kotlin
public inline val Stretch: FlexAlignContent
```

Stretches flex lines to fill available cross-axis space.

Distributes remaining cross-axis space evenly among all lines, expanding each line's
cross-axis size. Positions items within each line according to [FlexAlignItems](/jetpack-compose/androidx.compose.foundation/foundation-layout/classes/FlexAlignItems/api) or
[FlexAlignSelf](/jetpack-compose/androidx.compose.foundation/foundation-layout/classes/FlexAlignSelf/api). Items do not stretch unless configured with `FlexAlignItems.Stretch` or
`FlexAlignSelf.Stretch`.

### SpaceBetween

> Source set: Common

```kotlin
public inline val SpaceBetween: FlexAlignContent
```

Place lines such that they are spaced evenly across the cross axis, without free space
before the first line or after the last line.

### SpaceAround

> Source set: Common

```kotlin
public inline val SpaceAround: FlexAlignContent
```

Place lines such that they are spaced evenly across the cross axis, including free space
before the first line and after the last line, but half the amount of space existing
otherwise between two consecutive lines.

## Code Examples

### FlexBoxAlignContentSample

```kotlin
@Sampled
@Composable
fun FlexBoxAlignContentSample() {
    // Can be extracted to a top-level FlexBoxConfig
    val SpaceAroundWrap = FlexBoxConfig {
        direction(FlexDirection.Row)
        wrap(FlexWrap.Wrap)
        alignContent(FlexAlignContent.SpaceAround)
    }

    FlexBox(modifier = Modifier.fillMaxSize(), config = SpaceAroundWrap) {
        repeat(20) { Box(Modifier.size(80.dp).background(Color.Blue)) }
    }
}
```
