flex-wrap
Utilities for controlling how flex items wrap.
| Class | Effect |
|---|---|
flex-nowrap |
flex-wrap: nowrap; |
flex-wrap |
flex-wrap: wrap; |
flex-wrap-reverse |
flex-wrap: wrap-reverse; |
Examples
Section titled “Examples”Don’t wrap
Section titled “Don’t wrap”Use flex-nowrap to keep items on one line, shrinking them if needed.


if ui.div("flex flex-nowrap gap-4") { tile("01", "w-2/5 shrink-0") tile("02", "w-2/5 shrink-0") tile("03", "w-2/5")}Wrap normally
Section titled “Wrap normally”

if ui.div("flex flex-wrap gap-4") { tile("01", "w-2/5") tile("02", "w-2/5") tile("03", "w-2/5")}Wrap reversed
Section titled “Wrap reversed”

if ui.div("flex h-44 flex-wrap-reverse content-start gap-4") { tile("01", "w-2/5") tile("02", "w-2/5") tile("03", "w-2/5")}