Skip to content
Support Yumma CSS by starring us on GitHub!

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="stripes d-g g-4 gtc-3 ji-c">
<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="stripes d-g g-4 gtc-3 ji-e">
<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="stripes d-g g-4 gtc-3 ji-s">
<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="stripes d-g g-4 gtc-3 ji-st">
<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>

Utilizing utilities conditionally

Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.

Responsive breakpoints

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>

Utilizing utilities conditionally

Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.

Hover states

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>