Flex Wrap
Set how flex items wrap in a container.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
Usage
No Wrap
Prevent items from wrapping to the next line.
A
B
C
<div class="p-r c-white"> <div class="d-f fw-nw g-4 max-w-30"> <div class="d-f ai-c jc-c p-4 bg-indigo">A</div> <div class="d-f ai-c jc-c p-4 bg-indigo">B</div> <div class="d-f ai-c jc-c p-4 bg-indigo">C</div> </div></div>Wrap
Allow items to wrap onto multiple lines.
A
B
C
<div class="p-r c-white"> <div class="d-f fw-w g-4 max-w-30"> <div class="d-f ai-c jc-c p-4 bg-indigo">A</div> <div class="d-f ai-c jc-c p-4 bg-indigo">B</div> <div class="d-f ai-c jc-c p-4 bg-indigo">C</div> </div></div>Wrap Reverse
Allow items to wrap onto multiple lines in reverse order.
A
B
C
<div class="p-r c-white"> <div class="d-f fw-wr g-4 max-w-30"> <div class="d-f ai-c jc-c p-4 bg-indigo">A</div> <div class="d-f ai-c jc-c p-4 bg-indigo">B</div> <div class="d-f ai-c jc-c p-4 bg-indigo">C</div> </div></div>Responsiveness
Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.
Target viewport sizes with breakpoint prefixes.
sm:fw-*Small≥640px
md:fw-*Medium≥768px
lg:fw-*Large≥1024px
xxl:fw-*Extra Large≥1536px
Hover State
Apply styles conditionally on hover using the h: prefix.
Add the h: prefix to apply styles only when the user hovers over the element.
Syntax:
h:fw-*