Skip to main content

Grid Template Rows

Utilities for specifying the rows in a grid layout.

CSS Property:grid-template-rows
Classes:14

Grid Template Rows Classes

ClassCSS
grid-rows-1grid-template-rows: repeat(1, minmax(0, 1fr));
grid-rows-2grid-template-rows: repeat(2, minmax(0, 1fr));
grid-rows-3grid-template-rows: repeat(3, minmax(0, 1fr));
grid-rows-4grid-template-rows: repeat(4, minmax(0, 1fr));
grid-rows-5grid-template-rows: repeat(5, minmax(0, 1fr));
grid-rows-6grid-template-rows: repeat(6, minmax(0, 1fr));
grid-rows-7grid-template-rows: repeat(7, minmax(0, 1fr));
grid-rows-8grid-template-rows: repeat(8, minmax(0, 1fr));
grid-rows-9grid-template-rows: repeat(9, minmax(0, 1fr));
grid-rows-10grid-template-rows: repeat(10, minmax(0, 1fr));
grid-rows-11grid-template-rows: repeat(11, minmax(0, 1fr));
grid-rows-12grid-template-rows: repeat(12, minmax(0, 1fr));
grid-rows-nonegrid-template-rows: none;
grid-rows-subgridgrid-template-rows: subgrid;

Arbitrary Values

You can use arbitrary values with square bracket notation when you need a specific value not included in the default scale.

grid-rows-[200px_1fr]grid-rows-[auto_1fr_auto]

Responsive Variants

Apply grid template rows utilities at specific breakpoints using responsive prefixes.

BreakpointPrefixExample
640px+sm:sm:grid-rows-1
768px+md:md:grid-rows-1
1024px+lg:lg:grid-rows-1
1280px+xl:xl:grid-rows-1
1536px+2xl:2xl:grid-rows-1