Skip to content
Sunsetting Yumma CSS Intellisense extension 👋

Justify Items

Controls the alignment of grid elements relative to their inline axis.

Class Properties

ji-c

justify-items: center;

ji-e

justify-items: end;

ji-s

justify-items: start;

ji-st

justify-items: stretch;

Center

This example sets the justify items to center. The items will be centered within their grid area along the inline axis.

A
B
C
<div class="p-r tc-white">
<div class="d-g g-4 gtc-3 ji-c stripes">
<div class="ai-c bg-indigo d-f dim-14 jc-c rad-1">A</div>
<div class="ai-c bg-indigo d-f dim-14 jc-c rad-1">B</div>
<div class="ai-c bg-indigo d-f dim-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.

A
B
C
<div class="p-r tc-white">
<div class="d-g g-4 gtc-3 ji-e stripes">
<div class="ai-c bg-indigo d-f dim-14 jc-c rad-1">A</div>
<div class="ai-c bg-indigo d-f dim-14 jc-c rad-1">B</div>
<div class="ai-c bg-indigo d-f dim-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.

A
B
C
<div class="p-r tc-white">
<div class="d-g g-4 gtc-3 ji-s stripes">
<div class="ai-c bg-indigo d-f dim-14 jc-c rad-1">A</div>
<div class="ai-c bg-indigo d-f dim-14 jc-c rad-1">B</div>
<div class="ai-c bg-indigo d-f dim-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.

A
B
C
<div class="p-r tc-white">
<div class="d-g g-4 gtc-3 ji-st stripes">
<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 modifiers

You can combine responsive breakpoints like sm:ji-*,md:ji-*, lg:ji-*, and xxl:ji-* allows targeting specific utilities in different viewports.

<div class="ji-s md:ji-e ..."></div>
Hover modifiers

Alternatively, you can apply :hover by using h:ji-* utility to override elements and change their values when hovering over them.

<div class="ji-s h:ji-e ..."></div>