Flex

A flex component is used to create a flex container.

Usage

Vertical Alignment

A flex layout can have vertically aligned items.

Gap

A flex layout can have a gap between his items. columnGap and rowGap are also available to specify a gap for a single axis.

Align Items

A flex layout can align its items along the cross-axis. When the direction is "column", this refers to horizontal alignment, and when the direction is "row", it refers to vertical alignment.

Justify Content

A flex layout can justify its items along the main axis. When the direction is "column", this refers to vertical alignment, and when the direction is "row", it refers to horizontal alignment.

Reverse

A flex layout can show its items in reverse order.

Wrap

Flex layout items can wrap multiple rows.

Nesting

Flex layouts can be nested.

Props

direction?

The flex direction of the container. Can be row, column, row-reverse or column-reverse.

wrap?

Whether to wrap the flex items. The value can also be a boolean.

basis?

An alias for the css flex-basis property.

grow?

An alias for the css flex-grow property.

shrink?

An alias for the css flex-shrink property.

inline?

Whether to display the flex container as an inline element.

style?
className?
id?