2018-02-13 03:50:31 -08:00
|
|
|
---
|
2018-02-19 02:55:30 -08:00
|
|
|
path: "/docs/flex-direction"
|
2018-02-13 03:50:31 -08:00
|
|
|
title: "Flex Direction"
|
|
|
|
hasPlayground: true
|
|
|
|
---
|
|
|
|
|
2018-02-14 07:53:07 -08:00
|
|
|
## Flex Direction
|
|
|
|
|
2018-02-14 08:42:49 -08:00
|
|
|
Flex direction controls the direction in which children of a node are laid out.
|
|
|
|
This is also referred to as the main axis. The main axis is the direction in
|
|
|
|
which children are laid out. The cross axis the the axis perpendicular to the
|
|
|
|
main axis, or the axis which wrapping lines are laid out in.
|
|
|
|
|
2018-02-19 02:55:30 -08:00
|
|
|
**ROW (DEFAULT)** Align children from left to right. If [wrapping](/docs/flex-wrap) is enabled then
|
2018-02-14 08:42:49 -08:00
|
|
|
the next line will start under the first item on the left of the container.
|
|
|
|
|
2018-02-19 02:55:30 -08:00
|
|
|
**COLUMN** Align children from top to bottom. If [wrapping](/docs/flex-wrap) is enabled then
|
2018-02-14 08:42:49 -08:00
|
|
|
the next line will start to the left first item on the top of the container.
|
|
|
|
|
2018-02-19 02:55:30 -08:00
|
|
|
**ROW REVERSE** Align children from right to left. If [wrapping](/docs/flex-wrap) is enabled then
|
2018-02-14 08:42:49 -08:00
|
|
|
the next line will start under the first item on the right of the container.
|
|
|
|
|
2018-02-19 02:55:30 -08:00
|
|
|
**COLUMN REVERSE** Align children from bottom to top. If [wrapping](/docs/flex-wrap) is enabled then
|
2018-02-14 08:42:49 -08:00
|
|
|
the next line will start to the left first item on the bottom of the container.
|
|
|
|
|
2018-02-14 07:53:07 -08:00
|
|
|
<controls prop="flexDirection"></controls>
|