Flex
A flexbox layout component for arranging children with flexible alignment and spacing.
When to Use
- For quick horizontal or vertical layouts with gap control
- As a simpler alternative to CSS flexbox for common patterns
- To wrap or distribute items with justify and align options
Import
Examples
Horizontal Row
The default direction is horizontal.
Vertical Column
Set vertical for a column layout.
Gap Sizes
Choose from preset sizes: small, middle, or large.
Justify Content
Distribute items along the main axis.
Wrap
Enable wrapping for items that overflow.
API
FlexProps
vertical—boolean— Use column direction (default:false)wrap—boolean | "wrap" | "nowrap" | "wrap-reverse"— Flex wrap behaviorjustify—"flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "start" | "end" | "normal"— Main axis alignmentalign—"flex-start" | "center" | "flex-end" | "stretch" | "baseline" | "start" | "end" | "normal"— Cross axis alignmentgap—"small" | "middle" | "large" | string | number— Gap between itemsflex—string | number— CSS flex shorthandcomponent—string— Custom HTML element (default:"div")className—string— Custom CSS classstyle—CSSProperties— Inline styles