Browse documentation
Reference / Flexbox & grid
Flex wrap
Allow a row of items to flow onto more lines when their combined widths exceed the container.
Working example
- Printing
- Binding
- Distribution
A gap adds space between tags on each line and between wrapped lines.
<ul class="flex max-w-48 flex-wrap gap-2">
<li class="border px-2">Printing</li>
<li class="border px-2">Binding</li>
<li class="border px-2">Distribution</li>
</ul>Class reference
| Class | CSS declarations |
|---|---|
flex-wrap | flex-wrap: wrap; |
flex-nowrap | flex-wrap: nowrap; |
flex-wrap-reverse | flex-wrap: wrap-reverse; |
View full generated CSS
.flex-nowrap {
flex-wrap: nowrap;
}
.flex-wrap {
flex-wrap: wrap;
}
.flex-wrap-reverse {
flex-wrap: wrap-reverse;
}