Justify Content
Controls the positioning of flex and grid elements on a container's main axis.
| Class | Style |
|---|---|
| jc-c | justify-content: center;
|
| jc-fe | justify-content: flex-end;
|
| jc-fs | justify-content: flex-start;
|
| jc-n | justify-content: normal;
|
| jc-st | justify-content: stretch;
|
| jc-sa | justify-content: space-around;
|
| jc-sb | justify-content: space-between;
|
| jc-se | justify-content: space-evenly;
|
Normal
Initial value
The items will be aligned according to the default alignment of the container.
<div class="d-f g-4 jc-n tc-white" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">C</div></div>Center
The items will be centered within the container along the main axis.
<div class="d-f g-4 jc-c tc-white" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">C</div></div>Flex End
The items will be aligned to the end of the container along the main axis.
<div class="d-f g-4 jc-fe tc-white" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">C</div></div>Flex Start
The items will be aligned to the start of the container along the main axis.
<div class="d-f g-4 jc-fs tc-white" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">C</div></div>Stretch
The items will stretch to fill the available space along the main axis.
<div class="rad-1 tc-white"> <div class="d-g g-4 gaf-c jc-s" 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>Space Between
The items will be evenly distributed in the container, with the first item at the start and the last item at the end.
<div class="d-f g-4 jc-sb tc-white" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">C</div></div>Space Around
The items will be evenly distributed in the container with space around them.
<div class="d-f g-4 jc-sa tc-white" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">C</div></div>Space Evenly
The items will be evenly distributed in the container with equal space around them.
<div class="d-f g-4 gaf-c jc-se tc-white" id="area"> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">A</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">B</div> <div class="ai-c bg-indigo d-f d-14 jc-c p-4 rad-1">C</div></div>Conditional styles
Learn how to override existing utilities based on the user’s screen size or other factors, such as hover states.
Breakpoint variant
You can combine responsive breakpoints like sm:jc-*,md:jc-*, lg:jc-*, and xxl:jc-* to allow targeting specific utilities in different viewports.
<div class="jc-fs md:jc-fe ..."></div>Hover variant
Alternatively, you can apply :hover by using h:jc-* utility to override elements and change their values when hovering over
them.
<div class="jc-fs h:jc-fe ..."></div>