Check out our free templates made with AI and polished to perfection in Windframe

Get now
Last updated: 12 August 2025

Tailwind CSS Grid Row Start/End

The grid-row-start and grid-row-end utilities in Tailwind control where an element’s row starts and ends within a CSS Grid layout. They define how many rows an element spans or where it’s positioned vertically.


Tailwind Grid Row Start/End

The grid-row-start and grid-row-end utilities in Tailwind control where an element’s row starts and ends within a CSS Grid layout. They define how many rows an element spans or where it’s positioned vertically.

How to apply Tailwind Grid Row Start/End

To apply row start and end positions to a grid item, you can use the tailwind row-{start/end}-{line} utility classes, where {start/end} represents the desired start and end positions, and {line} represents the line number or name of the grid track.

html
<div class="h-64 grid grid-rows-3 grid-flow-col gap-4">
<div class="bg-blue-500 row-start-1 row-end-2">Item 1</div>
<div class="bg-blue-500">Item 2</div>
<div class="bg-blue-500 row-span-2">Item 3</div>
</div>

Preview

Item 1

items 2

items 3

Responsive Tailwind Grid Row Start/End

Tailwind CSS allows you to apply row start and end positions responsively at different breakpoints. To use responsive tailwind grid row start/end classes, you can append the breakpoint prefix to the utility classes. For example, md:grid-row-start-2 sets the start position to the second row starting from the medium breakpoint and above. Here's an example:

html
<div class="grid grid-cols-2 md:grid-cols-3">
<div class="bg-indigo-500 md:grid-row-start-2 md:grid-row-end-4">Item 1</div>
<div class="bg-indigo-500">Item 2</div>
<div class="bg-indigo-500">Item 3</div>
</div>

Preview

Item 1

Item 2
Item 3

In the above example, a grid container with 2 columns by default (grid-cols-2) and 3 columns starting from the medium breakpoint and above (md:grid-cols-3) is created. The md:grid-row-start-2 class is applied to the first grid item (Item 1) to specify that it should start at the second row from the medium breakpoint, and the md:grid-row-end-4 class is used to specify that it should end at the fourth row.

Arbitrary Value Usage

You can set custom start/end values with arbitrary syntax:

html
<div class="grid grid-rows-[repeat(6,minmax(0,1fr))]">
<div class="row-start-[2] row-end-[5] bg-purple-300">Custom lines</div>
</div>

Preview

Custom lines

Useful when you’re working with dynamic or non-standard grid templates.

Customization in tailwind.config.js

Extend grid row utilities to match your design system:

js
module.exports = {
theme: {
extend: {
gridRowStart: {
13: "13",
},
gridRowEnd: {
13: "13",
},
},
},
};

Now you can use:

html
<div class="row-start-13 row-end-13"></div>

Real UI Component Example

Event Schedule Layout

html
<div class="grid grid-rows-[repeat(12,minmax(0,1fr))] gap-2 h-[600px]">
<div class="bg-blue-200 row-start-1 row-end-4 p-2 rounded">
<h3 class="font-bold">Morning Standup</h3>
<p>9:00 - 10:30 AM</p>
</div>
<div class="bg-green-200 row-start-4 row-end-7 p-2 rounded">
<h3 class="font-bold">Project Review</h3>
<p>10:30 AM - 12:00 PM</p>
</div>
<div class="bg-yellow-200 row-start-7 row-end-9 p-2 rounded">
<h3 class="font-bold">Lunch Break</h3>
</div>
<div class="bg-purple-200 row-start-9 row-end-12 p-2 rounded">
<h3 class="font-bold">Design Workshop</h3>
</div>
</div>

Preview

Morning Standup

9:00 - 10:30 AM

Project Review

10:30 AM - 12:00 PM

Lunch Break

Design Workshop

This design makes it easy to visualize a calendar or scheduler UI.

Best Practices

  • Use row-span for simple spans and row-start/row-end for precise control.

  • Keep grid templates explicit in grid-template-rows for maintainability.

  • Avoid overusing arbitrary values unless necessary — it can reduce clarity.

  • Combine with col-start/col-end for full two-dimensional control.

Tailwind Grid Row start/end Class Table

ClassProperties
row-autogrid-row: auto;
row-span-1grid-row: span 1 / span 1;
row-span-2grid-row: span 2 / span 2;
row-span-3grid-row: span 3 / span 3;
row-span-4grid-row: span 4 / span 4;
row-span-5grid-row: span 5 / span 5;
row-span-6grid-row: span 6 / span 6;
row-span-fullgrid-row: 1 / -1;
row-start-1grid-row-start: 1;
row-start-2grid-row-start: 2;
row-start-3grid-row-start: 3;
row-start-4grid-row-start: 4;
row-start-5grid-row-start: 5;
row-start-6grid-row-start: 6;
row-start-7grid-row-start: 7;
row-start-autogrid-row-start: auto;
row-end-1grid-row-end: 1;
row-end-2grid-row-end: 2;
row-end-3grid-row-end: 3;
row-end-4grid-row-end: 4;
row-end-5grid-row-end: 5;
row-end-6grid-row-end: 6;
row-end-7grid-row-end: 7;
row-end-autogrid-row-end: auto;

📚 Ready to Keep Going?

Windframe is an AI visual editor for rapidly building stunning web UIs & websites

Start building stunning web UIs & websites!

Build from scratch or select prebuilt tailwind templates