Flexbox & Grid
Handy classes for lining up flex and grid children along the cross axis of their parent container.
| Class | Styles |
|---|---|
| items-start | align-items: flex-start; |
| items-end | align-items: flex-end; |
| items-end-safe | align-items: safe flex-end; |
| items-center | align-items: center; |
| items-center-safe | align-items: safe center; |
| items-baseline | align-items: baseline; |
| items-baseline-last | align-items: last baseline; |
| items-stretch | align-items: stretch; |
Reach for the items-stretch utility to stretch items across the container's cross axis:
<div class="flex items-stretch ..."> <div class="py-4">01</div> <div class="py-12">02</div> <div class="py-8">03</div></div>Reach for the items-start utility to line items up at the start of the container's cross axis:
<div class="flex items-start ..."> <div class="py-4">01</div> <div class="py-12">02</div> <div class="py-8">03</div></div>Reach for the items-center utility to line items up along the center of the container's cross axis:
<div class="flex items-center ..."> <div class="py-4">01</div> <div class="py-12">02</div> <div class="py-8">03</div></div>Reach for the items-end utility to line items up at the end of the container's cross axis:
<div class="flex items-end ..."> <div class="py-4">01</div> <div class="py-12">02</div> <div class="py-8">03</div></div>Reach for the items-baseline utility to line items up along the container's cross axis so that every baseline sits together:
<div class="flex items-baseline ..."> <div class="pt-2 pb-6">01</div> <div class="pt-8 pb-12">02</div> <div class="pt-12 pb-4">03</div></div>Reach for the items-baseline-last utility to line items up along the container's cross axis so that every baseline sits flush with the last baseline in the container:

Shaping the future of remote crew scheduling at Orbita Labs.

A curious product designer.
<div class="grid grid-cols-[1fr_auto] items-baseline-last"> <div> <img src="img/spencer-sharp.jpg" /> <h4>Spencer Sharp</h4> <p>Working on the future of astronaut recruitment at Space Recruit.</p> </div> <p>spacerecruit.com</p></div>This comes in handy when you want text items to line up neatly with one another, even when their heights differ.
Prefix any align-items utility with a breakpoint variant such as md: so it kicks in only at medium screen sizes and larger:
<div class="flex items-stretch md:items-center ..."> <!-- ... --></div>Read up on how variants work over in the variants documentation.