Flex Direction
Controls the direction of flex elements.
Widely available
This feature is well established and works across many devices and browser versions.
| Class | Style |
|---|---|
fd-c | flex-direction: column; |
fd-cr | flex-direction: column-reverse; |
fd-r | flex-direction: row; |
fd-rr | flex-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 d-16 d-f ai-c jc-c">A</div> <div class="d-16 bg-indigo ta-c d-16 d-f ai-c jc-c">B</div> <div class="d-16 bg-indigo ta-c d-16 d-f ai-c jc-c">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 d-16 d-f ai-c jc-c">A</div> <div class="bg-indigo ta-c d-16 d-f ai-c jc-c">B</div> <div class="bg-indigo ta-c d-16 d-f ai-c jc-c">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 d-16 d-f ai-c jc-c">A</div> <div class="bg-indigo ta-c d-16 d-f ai-c jc-c">B</div> <div class="bg-indigo ta-c d-16 d-f ai-c jc-c">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 d-16 d-f ai-c jc-c">A</div> <div class="d-16 bg-indigo ta-c d-16 d-f ai-c jc-c">B</div> <div class="d-16 bg-indigo ta-c d-16 d-f ai-c jc-c">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.
Targeting different viewports
You can combine responsive breakpoints like sm:fd-*, md:fd-*, lg:fd-*, and xxl:fd-* to allow targeting specific utilities in different viewports.
Targeting hover states
Alternatively, you can apply :hover by using h:fd-* utility to override elements and change their values when hovering over them.