Flexbox & GridFlex Wrap

Flex Wrap

Controls how flex items are wrapped.

ClassStyle
fw-nwflex-wrap: nowrap;
fw-wflex-wrap: wrap;
fw-wrflex-wrap: wrap-reverse;

No Wrap

Initial value

The items will be displayed in a single line, and they will not wrap to the next line.

<div class="p-r tc-white">
<div class="d-f fw-nw g-4 max-w-30" id="area">
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">A</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">B</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">C</div>
</div>
</div>

Wrap

The items will wrap onto multiple lines if there is not enough space in the container.

<div class="p-r tc-white">
<div class="d-f fw-w g-4 max-w-30" id="area">
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">A</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">B</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">C</div>
</div>
</div>

Wrap Reverse

The items will wrap onto multiple lines, but the order of the lines will be reversed.

<div class="p-r tc-white">
<div class="d-f fw-wr g-4 max-w-30" id="area">
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">A</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">B</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">C</div>
</div>
</div>

Using utility variants

Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.

Using media queries

You can combine responsive breakpoints like sm:fw-*, md:fw-*, lg:fw-*, and xxl:fw-* to allow targeting specific utilities in different viewports.

Using hover states

Alternatively, you can apply :hover by using h:fw-* utility to override elements and change their values when hovering over them.