CSS Grid Generator

Design your grid. Generate your CSS.

FreeOpen sourceNo sign-up

Preview

Click + to add an item. Drag an item to move it and drag its corner to resize it. With an item focused: Arrow keys move, Shift + Arrow keys resize, Delete removes.

Code

CSS


      

HTML


      

GridFlow documentation

How to use GridFlow

  1. Pick a preset, or set the number of columns and rows.
  2. Set each track's size and the gap between tracks.
  3. Click a + cell to add an item. Drag it to move it and drag its corner to resize it.
  4. Select an item to give it a label, exact grid lines and its own alignment.
  5. Copy or download the CSS, and copy the HTML.

Track sizes

ValueWhat it does
1frA share of the free space. 2fr gets twice as much as 1fr.
200px, 25%A fixed size, or a share of the container.
autoFits the content and can grow into free space.
min-contentAs narrow as the content allows.
minmax(100px, 1fr)Never smaller than 100px, otherwise a share of the space.
fit-content(300px)Fits the content, up to 300px.

Template areas

Turn on Use named grid areas to describe the layout as a map of names. Each item's label becomes its area name, so a header across three columns is written as "header header header". Empty cells are written as a dot.

Privacy

GridFlow runs entirely in your browser. There are no accounts, ads, cookies or analytics, and your layouts are never sent anywhere. Your theme and your last layout are saved in your browser's local storage so they are there next time. Fonts load from Google Fonts.