Skip to content

Flex Direction

Below, utility classes to apply display and flex-direction properties.

ClassProperties
.flex-rowdisplay: flex; flex-direction: row;
.flex-row-reversedisplay: flex; flex-direction: row-reverse;
.flex-columndisplay: flex; flex-direction: column;
.flex-column-reversedisplay: flex; flex-direction: column-reverse;

Example(s)

1
2
3
html
<div class="flex-row gap-x-2">
  <div class="sqrt-12 ...">1</div>
  <div class="sqrt-12 ...">2</div>
  <div class="sqrt-12 ...">3</div>
</div>
123
html
<div class="flex-row-reverse gap-x-2">
  <div class="sqrt-12 ...">1</div>
  <div class="sqrt-12 ...">2</div>
  <div class="sqrt-12 ...">3</div>
</div>
123
html
<div class="flex-column gap-y-2">
  <div class="sqrt-12 ...">1</div>
  <div class="sqrt-12 ...">2</div>
  <div class="sqrt-12 ...">3</div>
</div>
123
html
<div class="flex-column-reverse gap-y-2">
  <div class="sqrt-12 ...">1</div>
  <div class="sqrt-12 ...">2</div>
  <div class="sqrt-12 ...">3</div>
</div>

Media Queries

flex-direction is supported by changing state on-the-fly! You can use it like this:

html
<div class="flex-column small:flex-row">...</div>

Released under the Beerware 🍺 License.