1. Flexbox & Grid
  2. align-self

Flexbox & Grid

align-self

Helpers for setting the way a single flex or grid item lines up against the cross axis of its parent container.

ClassStyles
self-auto
align-self: auto;
self-start
align-self: flex-start;
self-end
align-self: flex-end;
self-end-safe
align-self: safe flex-end;
self-center
align-self: center;
self-center-safe
align-self: safe center;
self-stretch
align-self: stretch;
self-baseline
align-self: baseline;
self-baseline-last
align-self: last baseline;

Examples

Auto

Reach for the self-auto utility when an item should simply inherit whatever the container's align-items property

01
02
03
<div class="flex items-stretch ...">  <div>01</div>  <div class="self-auto ...">02</div>  <div>03</div></div>

Start

Reach for the self-start utility to pin an item to the start of the container's cross axis, no matter what its align-items value happens to be:

01
02
03
<div class="flex items-stretch ...">  <div>01</div>  <div class="self-start ...">02</div>  <div>03</div></div>

Center

Reach for the self-center utility to seat an item along the center of the container's cross axis, no matter what its align-items value happens to be:

01
02
03
<div class="flex items-stretch ...">  <div>01</div>  <div class="self-center ...">02</div>  <div>03</div></div>

End

Reach for the self-end utility to push an item to the end of the container's cross axis, whatever the container's align-items value may be:

01
02
03
<div class="flex items-stretch ...">  <div>01</div>  <div class="self-end ...">02</div>  <div>03</div></div>

Stretch

Reach for the self-stretch utility to let an item grow and fill the container's cross axis, whatever the align-items value may be:

01
02
03
<div class="flex items-stretch ...">  <div>01</div>  <div class="self-stretch ...">02</div>  <div>03</div></div>

Baseline

Reach for the self-baseline utility to line up an item so its baseline sits on the baseline of the flex container's cross axis:

01
02
03
<div class="flex ...">  <div class="self-baseline pt-2 pb-6">01</div>  <div class="self-baseline pt-8 pb-12">02</div>  <div class="self-baseline pt-12 pb-4">03</div></div>

Last baseline

Reach for the self-baseline-last utility to place an item along the container's cross axis so its baseline meets the last baseline found in the container:

Marlowe Quinn

Working on the future of coral restoration at Reefwright Labs.

reefwright.com
Nia Bloom

A generalist product thinker.

nia-bloom.com
<div class="grid grid-cols-[1fr_auto]">  <div>    <img src="img/spencer-sharp.jpg" />    <h4>Spencer Sharp</h4>    <p class="self-baseline-last">Working on the future of astronaut recruitment at Space Recruit.</p>  </div>  <p class="self-baseline-last">spacerecruit.com</p></div>

This comes in handy when you want blocks of text to line up neatly, even when each one is a different height.

Responsive design

Add a breakpoint variant such as md: in front of an align-self utility to switch it on only from medium screens upward:

<div class="self-auto md:self-end ...">  <!-- ... --></div>

Read more about how variants work in the variants documentation.

Ship interfaces people love — 5-day mini-course

6-day email course

Build UIs your users adore.

Bite-sized, hands-on screencasts from the team behind Breezel, sent straight to your inbox each day for a whole week.

Grab the free course

Copyright © 2026 Breezel, Inc.·Trademark Policy