FlexDirection
-
Cmn
@ExperimentalFlexBoxApi
value class FlexDirection
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 companion properties
Column
val Column: FlexDirection
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 ColumnReverse: FlexDirection
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 Row: FlexDirection
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 RowReverse: FlexDirection
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.