Wrap
Wrap is a Box that lays its children out in a row and lets them spill to the next line when the container runs out of width. Reach for it when the item width is intrinsic and the column count isn't fixed.
Loading playground…
What it is
A <Box display="flex" flexWrap="wrap">. The gap style prop spaces items both horizontally and
vertically — no margin tricks required. Stack is the better choice when the column count is
fixed; Wrap is the better choice when items size themselves and you want the line break to happen
naturally.
Install
Wrap is exported from usemotif. No separate install.
API
Wrap
stablefunction Wrap(props: WrapProps): JSX.Element
…BoxPropsOmit<BoxProps, "flexWrap">
Every Box prop except `flexWrap`, which Wrap manages.
Examples
Tag list:
Chip row with an aligned action at the end: