Skip to content

Flex Direction

Controls the direction of flex elements.

Utility Properties
Failed to load data. Please try again later.

Column

This example sets the flex direction to column. The items will be arranged vertically in a single column.

A
B
C
<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

This example sets the flex direction to column-reverse. The items will be arranged vertically in a single column, but in reverse order.

A
B
C
<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

Initial value

This example sets the flex direction to row. The items will be arranged horizontally in a single row.

A
B
C
<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>

Row Reverse

This example sets the flex direction to row-reverse. The items will be arranged horizontally in a single row, but in reverse order.

A
B
C
<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>

Conditional styles

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

Media modifier

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

<div class="fd-c md:fd-r ..."></div>

Hover modifier

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

<div class="fd-c h:fd-r ..."></div>