Flexbox & grid

The basics — .joy-flex, .joy-flex-col, .joy-flex-wrap, .joy-grid-2/3/4, .joy-gap-16, .joy-items-center, .joy-items-start, .joy-justify-center, .joy-justify-between, .joy-order-first/last — are on Utilities. This page has everything else.

Flex direction & wrap

ClassCSS
.joy-flex-rowflex-direction: row
.joy-flex-row-reverseflex-direction: row-reverse
.joy-flex-col-reverseflex-direction: column-reverse
.joy-flex-nowrapflex-wrap: nowrap
.joy-flex-wrap-reverseflex-wrap: wrap-reverse

Flex item sizing

flex-1
flex-1
auto width
<div class="joy-flex joy-gap-3">
    <div class="joy-flex-1" style="background:rgba(127,127,127,.1);padding:12px;border-radius:8px;">flex-1</div>
    <div class="joy-flex-1" style="background:rgba(127,127,127,.1);padding:12px;border-radius:8px;">flex-1</div>
    <div style="background:rgba(127,127,127,.1);padding:12px;border-radius:8px;">auto width</div>
</div>
ClassCSS
.joy-flex-1flex: 1 1 0% — grows/shrinks, ignores its content size
.joy-flex-autoflex: 1 1 auto — grows/shrinks, starts from its content size
.joy-flex-initialflex: 0 1 auto — shrinks but never grows
.joy-flex-noneflex: none — fixed size, ignores available space
.joy-flex-grow / .joy-flex-grow-0flex-grow: 1 / 0
.joy-flex-shrink / .joy-flex-shrink-0flex-shrink: 1 / 0
.joy-basis-0/auto/fullflex-basis

Order

.joy-order-first and .joy-order-last already exist. For anything in between:

ClassValue
.joy-order-00
.joy-order-11
.joy-order-22
.joy-order-33

Grid columns & rows

.joy-grid-2/3/4 from Utilities still work. .joy-grid-cols-* covers 1–6 and is what the rest of this section (span, start/end) pairs with — both set display: grid on their own.

1
2
3
<div class="joy-grid-cols-3 sm:joy-grid-cols-1 joy-gap-3">
    <div style="background:rgba(127,127,127,.1);padding:12px;border-radius:8px;">1</div>
    <div style="background:rgba(127,127,127,.1);padding:12px;border-radius:8px;">2</div>
    <div style="background:rgba(127,127,127,.1);padding:12px;border-radius:8px;">3</div>
</div>
ClassCSS
.joy-grid-cols-1.joy-grid-cols-6display: grid; grid-template-columns: repeat(N, 1fr)
.joy-grid-rows-1.joy-grid-rows-4grid-template-rows: repeat(N, 1fr)

Spanning & placement

col-span-2
1
<div class="joy-grid-cols-3 joy-gap-3">
    <div class="joy-col-span-2" style="background:rgba(127,127,127,.1);padding:12px;border-radius:8px;">col-span-2</div>
    <div style="background:rgba(127,127,127,.1);padding:12px;border-radius:8px;">1</div>
</div>
ClassCSS
.joy-col-span-1.joy-col-span-6grid-column: span N / span N
.joy-col-span-fullgrid-column: 1 / -1
.joy-col-start-1.joy-col-start-4grid-column-start
.joy-col-end-1.joy-col-end-4grid-column-end
.joy-row-span-1.joy-row-span-3, .joy-row-span-fullgrid-row

Auto-flow & auto tracks

ClassCSS
.joy-grid-flow-row/col/row-dense/col-densegrid-auto-flow
.joy-auto-cols-auto/min/max/frgrid-auto-columns
.joy-auto-rows-auto/min/max/frgrid-auto-rows

Gap

.joy-gap-1 through .joy-gap-6 are on Utilities.

Justify content, items, self

.joy-justify-center and .joy-justify-between already exist.

ClassCSS
.joy-justify-start/end/around/evenlyjustify-content
.joy-justify-items-start/center/end/stretchjustify-items (grid)
.joy-justify-self-auto/start/center/end/stretchjustify-self (grid item)

Align content, items, self

.joy-items-center and .joy-items-start already exist.

ClassCSS
.joy-items-end/baseline/stretchalign-items
.joy-content-start/center/end/between/around/evenlyalign-content
.joy-self-auto/start/center/end/stretchalign-self

Place (shorthand for align + justify together)

ClassCSS
.joy-place-content-center/start/end/between/around/evenly/stretchplace-content
.joy-place-items-center/start/end/stretchplace-items
.joy-place-self-auto/center/start/end/stretchplace-self