A flexible layout component for arranging children with configurable gap, direction, justification, alignment, and wrapping.
Anatomy
<Flex />Examples
Gaps
The gap prop controls the spacing between child elements using predefined scale values 0 through 8.
0
1
2
3
4
5
6
7
8
Directions
The direction prop sets the flex direction: row, row-reverse, column, or column-reverse.
row
row-reverse
column
column-reverse
Justify
The justify prop controls the main-axis alignment: start, end, center, between, around, or evenly.
start
end
center
between
around
evenly
Align
The align prop controls the cross-axis alignment: start, end, center, stretch, or baseline.
start
end
center
stretch
baseline
Wrap
The wrap prop controls flex wrapping: nowrap, wrap, or wrap-reverse.
nowrap
wrap
wrap-reverse