Flexbox & Grid Utilities
Utilities for building 1D and 2D responsive layouts using CSS Flexbox and CSS Grid.
Flex Direction & Wrapping
| Class | Properties |
|---|---|
flex-row | flex-direction: row; |
flex-row-reverse | flex-direction: row-reverse; |
flex-col | flex-direction: column; |
flex-col-reverse | flex-direction: column-reverse; |
flex-wrap | flex-wrap: wrap; |
flex-nowrap | flex-wrap: nowrap; |
flex-wrap-reverse | flex-wrap: wrap-reverse; |
Justify Content & Alignment
| Class | Properties |
|---|---|
justify-start | justify-content: flex-start; |
justify-center | justify-content: center; |
justify-end | justify-content: flex-end; |
justify-between | justify-content: space-between; |
justify-around | justify-content: space-around; |
items-start | align-items: flex-start; |
items-center | align-items: center; |
items-end | align-items: flex-end; |
items-stretch | align-items: stretch; |
Grid Columns & Rows
| Class | Properties |
|---|---|
grid-cols-1 | grid-template-columns: repeat(1, minmax(0, 1fr)); |
grid-cols-2 | grid-template-columns: repeat(2, minmax(0, 1fr)); |
grid-cols-3 | grid-template-columns: repeat(3, minmax(0, 1fr)); |
grid-cols-4 | grid-template-columns: repeat(4, minmax(0, 1fr)); |
grid-cols-6 | grid-template-columns: repeat(6, minmax(0, 1fr)); |
grid-cols-12 | grid-template-columns: repeat(12, minmax(0, 1fr)); |
Gap
Control gutters between grid and flex items:
| Class | Properties |
|---|---|
gap-1 | gap: 0.25rem; |
gap-2 | gap: 0.5rem; |
gap-3 | gap: 0.75rem; |
gap-4 | gap: 1rem; |
gap-6 | gap: 1.5rem; |
gap-8 | gap: 2rem; |
gap-x-4 | column-gap: 1rem; |
gap-y-4 | row-gap: 1rem; |