Flexbox & Grid
Utilities for controlling the direction of flex items.
Class | Styles |
---|---|
flex-row | flex-direction: row; |
flex-row-reverse | flex-direction: row-reverse; |
flex-col | flex-direction: column; |
flex-col-reverse | flex-direction: column-reverse; |
Use flex-row
to position flex items horizontally in the same direction as text:
Use flex-row-reverse
to position flex items horizontally in the opposite direction:
Use flex-col
to position flex items vertically:
Use flex-col-reverse
to position flex items vertically in the opposite direction:
Prefix a flex direction utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<div class="flex flex-col md:flex-row"> <!-- ... --></div>
Learn more about using variants in the variants documentation.