Flexbox

A CSS layout mode that arranges a container's children in a row or column and distributes space between them.

In more detail

Flexbox and grid lay out direct children only, so an extra wrapper element around a child can break the layout. That is one reason the asChild pattern avoids wrappers.

Example

In the browser: Setting display: flex on a container makes its children flex items. Properties such as flex-grow, flex-shrink, flex-basis, justify-content and align-items control sizing and alignment along the main and cross axes.

Related terms

Taught in

References