Justify Items
Controls the alignment of grid elements relative to their inline axis.
Utility | Properties |
---|---|
Error: 429 |
Center
This example sets the justify items to center. The items will be centered within their grid area along the inline axis.
<div class="p-r tc-white"> <div class="d-g g-4 gtc-3 ji-c" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c rad-1">C</div> </div></div>
End
This example sets the justify items to end. The items will be aligned to the end of their grid area along the inline axis.
<div class="p-r tc-white"> <div class="d-g g-4 gtc-3 ji-e" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c rad-1">C</div> </div></div>
Start
This example sets the justify items to start. The items will be aligned to the start of their grid area along the inline axis.
<div class="p-r tc-white"> <div class="d-g g-4 gtc-3 ji-s" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c rad-1">C</div> </div></div>
Stretch
This example sets the justify items to stretch. The items will stretch to fill their grid area along the inline axis.
<div class="p-r tc-white"> <div class="d-g g-4 gtc-3 ji-st" id="area"> <div class="ai-c bg-indigo d-f h-14 jc-c rad-1">A</div> <div class="ai-c bg-indigo d-f h-14 jc-c rad-1">B</div> <div class="ai-c bg-indigo d-f h-14 jc-c 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="ji-s md:ji-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="ji-s h:ji-e ..."></div>