Skip to content

Gap

Controls gaps between grid and flexbox elements.

UtilityProperties
Failed to load data. Please try again later.

This example sets the gap to 2.5rem. The element will have uniform spacing of 2.5rem between its rows and columns.

A
B
C
D
E
<div class="g-10 d-g gtc-3 tc-white" id="area">
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">A</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">B</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">C</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">D</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">E</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:g-*,md:g-*, lg:g-*, and xxl:g-* allows targeting specific utilities in different viewports.

<div class="g-1 md:g-2 ..."></div>

Hover modifier

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

<div class="g-1 h:g-2 ..."></div>