Flutter docs
Default skin

Flex

A semantic alternative to CSS flex layout, with a responsive and token-aware API.

When to use

Use Flex for one-dimensional alignment, distribution, wrapping, and consistent gaps.

Examples

Basic

The basic usage.

align

Set align.

gap

Set the gap between elements, which has three preset sizes: small, medium, and large. You can also customize the gap size.

Wrap

Auto wrap line.

combination

Nesting can achieve more complex layouts.

API

Flex and FlexProps are exported from @ceebee/ui/client.

Flex

PropertyDescriptionTypeDefaultVersion
verticalIs direction of the flex vertical, use flex-direction: columnbooleanfalse5.10.0
wrapSet whether the element is displayed in a single line or in multiple linesflex-wrap | booleannowrapboolean: 5.17.0
justifySets the alignment of elements in the direction of the main axisjustify-contentnormal—
alignSets the alignment of elements in the direction of the cross axisalign-itemsnormal—
flexflex CSS shorthand propertiesflexnormal—
gapSets the gap between gridssmall | medium | large | string | number-—
componentcustom element typeReact.ComponentTypediv—
orientationdirection of the flexhorizontal | verticalhorizontal-

Also available

Ceebee's token-constrained server-safe Flex remains at @ceebee/ui; use @ceebee/ui/client for this complete API.