Flex

A flexible flexbox layout component with support for row/column directions and alignment options

Preview

Row

First
Second
Third

Row Reverse

First (right)
Second (middle)
Third (left)

Column

First
Second
Third

Column Reverse

First (bottom)
Second (middle)
Third (top)

Installation

Usage

API Reference

PropTypeDefaultDescription
rowbooleanfalseUse row direction (default is column)
reversedbooleanfalseReverse the flex direction
justify'start' | 'end' | 'end-safe' | 'center' | 'center-safe' | 'between' | 'around' | 'evenly' | 'stretch' | 'baseline' | 'normal''normal'Justify content along the main axis
align'start' | 'end' | 'end-safe' | 'center' | 'center-safe' | 'baseline' | 'baseline-last' | 'stretch''stretch'Align items along the cross axis
withPaddingbooleanfalseApply CSS variable-based padding
withGapsbooleanfalseApply CSS variable-based gap
withSpacingbooleanfalseApply both padding and gap
expandedbooleanfalseApply flex-1 to fill available space
classNamestring-Additional CSS classes