Defines the direction of the main axis in a FlexBox container.

The main axis determines the primary direction in which children are laid out. It establishes the main-start and main-end edges of the container. The cross axis is always perpendicular to the main axis.

See also
direction

Summary

Public companion properties

FlexDirection

The main axis is vertical.

Cmn
FlexDirection

The main axis is vertical, but the placement direction is reversed.

Cmn
FlexDirection

The main axis is horizontal.

Cmn
FlexDirection

The main axis is horizontal, but the placement direction is reversed.

Cmn

Public functions

open String
Cmn

Public companion properties

Column

val ColumnFlexDirection

The main axis is vertical. Items are placed starting from the main-start edge (the top of the container) and flowing toward the main-end edge (the bottom).

ColumnReverse

val ColumnReverseFlexDirection

The main axis is vertical, but the placement direction is reversed. The main-start edge becomes the bottom of the container, and items flow toward the main-end edge at the top.

Row

val RowFlexDirection

The main axis is horizontal. Items are placed starting from the main-start edge and flowing toward the main-end edge.

In a Left-To-Right (LTR) layout direction, main-start corresponds to the start (left) edge of the container. In a Right-To-Left (RTL) layout direction, main-start corresponds to the end (right).

RowReverse

val RowReverseFlexDirection

The main axis is horizontal, but the placement direction is reversed. The main-start and main-end edges are swapped.

In a Left-To-Right (LTR) layout direction, main-start becomes the right edge of the container, and items flow leftward. In a Right-To-Left (RTL) layout direction, main-start becomes the left edge.

Public functions

toString

open fun toString(): String