Flexbox & GridFlex Direction

Flex Direction

Controls the direction of flex elements.

ClassStyle
fd-cflex-direction: column;
fd-crflex-direction: column-reverse;
fd-rflex-direction: row;
fd-rrflex-direction: row-reverse;

Row

Initial value

The items will be arranged horizontally in a single row.

<div class="d-f fd-r cg-4 tc-white">
<div class="d-16 bg-indigo ta-c p-4 rad-1">A</div>
<div class="d-16 bg-indigo ta-c p-4 rad-1">B</div>
<div class="d-16 bg-indigo ta-c p-4 rad-1">C</div>
</div>

Column

The items will be arranged vertically in a single column.

<div class="d-f fd-c rg-4 tc-white">
<div class="bg-indigo ta-c p-4 rad-1">A</div>
<div class="bg-indigo ta-c p-4 rad-1">B</div>
<div class="bg-indigo ta-c p-4 rad-1">C</div>
</div>

Column Reverse

The items will be arranged vertically in a single column, but in reverse order.

<div class="d-f fd-cr rg-4 tc-white">
<div class="bg-indigo ta-c p-4 rad-1">A</div>
<div class="bg-indigo ta-c p-4 rad-1">B</div>
<div class="bg-indigo ta-c p-4 rad-1">C</div>
</div>

Row Reverse

The items will be arranged horizontally in a single row, but in reverse order.

<div class="d-f fd-rr cg-4 tc-white">
<div class="d-16 bg-indigo ta-c p-4 rad-1">A</div>
<div class="d-16 bg-indigo ta-c p-4 rad-1">B</div>
<div class="d-16 bg-indigo ta-c p-4 rad-1">C</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:fd-*, md:fd-*, lg:fd-*, and xxl:fd-* to allow targeting specific utilities in different viewports.

Using hover states

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