Grid

Grid system from Tailwind CSS, refer to the official doc for more detail usage

Grid Template Columns

Use the grid-cols-{n} utilities to create grids with n equally sized columns.

01
02
03
04
05
06
07
08
09

Grid Column Start / End

Use the col-span-{n} utilities to make an element span n columns.

01
02
03
04
05
06
07

Grid Column Start / End Line

Use the col-start-{n} and col-end-{n} utilities to make an element start or end at the nth grid line. These can also be combined with the col-span-{n} utilities to span a specific number of columns.

01
02
03
04

Grid Template Rows

Use the grid-rows-{n} utilities to create grids with n equally sized rows.

01
02
03
04
05
06
07
08
09

Grid Row Start / End Line

Use the row-start-{n} and row-end-{n} utilities to make an element start or end at the nth grid line. These can also be combined with the row-span-{n} utilities to span a specific number of rows.


Note that CSS grid lines start at 1, not 0, so a full-height element in a 3-row grid would start at line 1 and end at line 4.

01
02
03

Grid Row Start / End

Use the row-span-{n} utilities to make an element span n rows.

01
02
03

Grid Auto Flow

Use the grid-flow-{keyword} utilities to control how the auto-placement algorithm works for a grid layout.

01
02
03
04
05

Grid Auto Columns

Use the auto-cols-{size} utilities to control the size of implicitly-created grid columns.

01
02
03

Grid Auto Rows

Use the auto-rows-{size} utilities to control the size implicitly-created grid rows.

01
02
03

Hover, focus, and other states

Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:{class} to only apply the {class} utility on hover.

01
02
03

Breakpoints and media queries

You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:{class} to apply the {class} utility at only medium screen sizes and above.

01
02
03
04
05
06
07
08
09