Developer tools

CSS Grid Area Namer

Click one cell then another to select a rectangle, name it, and get a ready-to-use grid-template-areas layout plus a grid-area rule for each region.

How to use the CSS grid area namer

  1. Set columns and rowsChoose the size of the grid you're laying out.
  2. Click two cells to name a regionThe first click starts a rectangle, the second completes it and asks for a name.
  3. Copy the generated CSSGet grid-template-areas plus a grid-area rule for every named region.

Understanding grid-template-areas

The grid-template-areas property lets you lay out a CSS grid visually, using repeated names to describe rectangular regions and a period for any cell that's left unnamed.

Rectangular regions

Every named area must form a solid rectangle of cells, which this tool enforces automatically.

Unnamed cells

Cells you never name are written as a period, matching the CSS specification exactly.

Matching columns and rows

The output also includes grid-template-columns and grid-template-rows sized as equal fractions.

Per-area rules

Each named region gets its own class with grid-area set, ready to apply to a child element.

CSS Grid Area Namer FAQ

How do I name a region?

Click one cell to start a selection, then click another cell to complete the rectangle between them, and enter a name when prompted.

Can regions overlap?

No, naming a region overwrites any cells it covers, matching how grid-template-areas works: each cell can only belong to one named area.

What does a dot in the output mean?

A period represents an unnamed cell in grid-template-areas, exactly as the CSS specification defines it.

How do I remove a named area?

Click on any cell belonging to that area again and choose to clear it, or use Clear all to reset the whole grid.

What CSS do I need to add for each area?

Give the container the generated grid-template-areas and grid-template-columns/rows, then apply grid-area: name to the child element for each area.

Try other free tools

More handy tools from My Panda Toolbox.