Skip to content

Grid Template Columns

Utilities to define the columns in a grid layout.

Utility Properties
Error: 429

This example sets the grid template columns to repeat(3, minmax(0, 1fr)). The grid will have 3 columns, each with a minimum size of 0 and a maximum size of 1fr, allowing them to grow and fill the available space equally.

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

<div class="gtc-1 md:gtc-2 ..."></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="gtc-1 h:gtc-2 ..."></div>