Browse documentation

Reference / Flexbox & grid

Grid row

Place a grid item along the block axis and stretch it across multiple rows.

Working example

Row spans are counted from an item’s placement. An explicit row start anchors the span at a particular line.

HTML
<div class="grid grid-cols-2 grid-rows-2 gap-2">
  <div class="row-span-2 grid place-items-center bg-black text-white">Cover</div>
  <p class="border p-2">Title page</p>
  <p class="border p-2">Contents</p>
</div>

Class reference

ClassCSS declarations
row-autogrid-row: auto;
row-span-2grid-row: span 2 / span 2;
row-span-fullgrid-row: 1 / -1;
row-start-2grid-row-start: 2;
row-end-3grid-row-end: 3;
-row-end-1grid-row-end: -1;
row-[1/3]grid-row: 1/3;
View full generated CSS
Compiled CSS
.row-\[1\/3\] {
  grid-row: 1/3;
}
.row-auto {
  grid-row: auto;
}
.row-span-2 {
  grid-row: span 2 / span 2;
}
.row-span-full {
  grid-row: 1 / -1;
}
.-row-end-1 {
  grid-row-end: -1;
}
.row-end-3 {
  grid-row-end: 3;
}
.row-start-2 {
  grid-row-start: 2;
}