Place Self
Controls how single items are justified and aligned simultaneously.
Utility | Properties |
---|---|
Error: 429 |
Auto
This example sets the place self to auto. The item will use the default alignment based on the container’s alignment properties.
<div id="area"> <div class="d-g g-4 gtc-3 pi-st tc-white"> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">A</div> <div class="ai-c bg-indigo d-f jc-c p-8 ps-auto rad-1">B</div> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">C</div> </div></div>
Center
This example sets the place self to center. The item will be centered within its grid area.
<div id="area"> <div class="d-g g-4 gtc-3 pi-st tc-white"> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">A</div> <div class="ai-c bg-indigo d-f jc-c p-8 ps-c rad-1">B</div> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">C</div> </div></div>
End
This example sets the place self to end. The item will be aligned to the end of its grid area.
<div id="area"> <div class="d-g g-4 gtc-3 pi-st tc-white"> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">A</div> <div class="ai-c bg-indigo d-f jc-c p-8 ps-e rad-1">B</div> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">C</div> </div></div>
Start
This example sets the place self to start. The item will be aligned to the start of its grid area.
<div id="area"> <div class="d-g g-4 gtc-3 pi-st tc-white"> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">A</div> <div class="ai-c bg-indigo d-f jc-c p-8 ps-s rad-1">B</div> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">C</div> </div></div>
Stretch
This example sets the place self to stretch. The item will stretch to fill its grid area along the cross axis.
<div id="area"> <div class="d-g g-4 gtc-3 pi-st tc-white"> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">A</div> <div class="ai-c bg-indigo d-f jc-c p-8 ps-st rad-1">B</div> <div class="ai-c bg-indigo-9 d-f jc-c p-8 rad-1">C</div> </div></div>
Conditional styles
Learn how to override existing utilities based on the user’s screen size or other factors, such as hover states.
Media modifier
You can combine responsive breakpoints like sm:-*
,md:-*
, lg:-*
, and xxl:-*
allows targeting specific utilities in different viewports.
<div class="ps-s md:ps-e ..."></div>
Hover modifier
Alternatively, you can apply :hover
by using h:-*
utility to override elements and change their values when hovering over them.
<div class="ps-s h:ps-e ..."></div>