figma guide
How to Use Grid Auto Layout in Figma for Card Grids and Dashboards
Build card grids and dashboards with Figma's grid auto layout: set tracks, use fr sizing, span cells, keep it responsive and hand it off as CSS grid.
Intermediate Product and UI designers who already use horizontal and vertical auto layout and now need two-dimensional card grids, bento layouts or dashboards.
- Published
- Read time
- 8 min
- Level
- Intermediate
- Editor
- Abdus Salam
Quick answer
To use grid auto layout in Figma, add auto layout to a frame (Shift A), switch its flow to Grid, then set the number of columns and rows in the grid picker in the right sidebar. Size tracks with fixed values, fill (fractional fr units) or hug. Make cards fill their cells, and use Column span and Row span for wide or tall tiles. The result maps closely to CSS grid, which makes handoff for card grids and dashboards much simpler.
Who this is for
Designers who already build stacks with horizontal and vertical auto layout and keep faking two-dimensional layouts with nested rows. If you’re building a product card grid, a bento section or a dashboard of KPI tiles and charts, the grid flow replaces most of that nesting. For column guides and an 8pt rhythm, see layout grids, baseline and 8pt spacing. That article covers a different feature.
Grid flow vs. layout guides
Figma has two things called “grid”, and they do different jobs. Figma’s grid flow article notes that the uniform grid in layout guides is a separate feature. Auto layout controls how content resizes and reflows, while layout guides are visual aids only.
| Grid auto layout flow | Layout guide (uniform grid, columns) | |
|---|---|---|
| What it does | Places and resizes layers in rows and columns | Draws guides you snap to |
| Moves content? | Yes, it reflows when you add, delete or resize | No |
| Spans | Column span and Row span per child | None |
| Best for | Card grids, bento boxes, dashboards, tables | Page columns, baseline rhythm |
A common setup uses both: layout guides for the page’s 12 columns, and a grid auto layout frame for the card area inside them.
Before you start
- You need edit access to the file. Figma lists the feature as available on all plans.
- Build one card first as a component with its own vertical auto layout, so it can fill whatever cell it lands in. Our cards guide covers card anatomy and variants.
- Decide the column count per breakpoint before you start, for example 4 on desktop, 2 on tablet and 1 on mobile.
Steps
- Add auto layout. Select the frame (or the loose cards) and press Shift A, or click Add auto layout in the right sidebar. Figma guesses a flow, so switch it to Grid if it picked vertical or horizontal.
- Set columns and rows. Click the grid picker in the right sidebar and type values in Number of columns and Number of rows, or use the interactive selector. Leave rows on Auto for card grids so rows are added and removed as cards come and go. You can type maths in these fields, such as
4*2. - Size the columns. Hover the top edge of the frame until the blue pills appear, click a track’s label, and choose a resizing option. For an even card grid, set every column to fill. Typing
AutoorAgives 1fr. For a dashboard with a wide main column, try2fr 1fr 1fr. Hold Cmd/Ctrl or Shift to select several tracks at once. - Size the rows. For card grids, hug or a fixed row height keeps rows tidy. For dashboards that fill the viewport, set rows to fill so they share the height. Fixed tracks also work for a toolbar row of known height.
- Set gap and padding. Use Gap between rows and Gap between columns, then horizontal and vertical padding. Cmd/Ctrl-click a padding field to type CSS shorthand such as
24,32. Match the gaps to your spacing tokens. - Add the cards. Drag instances into empty cells, or duplicate with Cmd/Ctrl D. With automatic positioning on (the default), cards fill cells left to right, top to bottom, and Figma adds rows when it runs out of room.
- Make each card fill its cell. Set the card’s width to Fill container, and its height too if rows are fixed or fill. Without this, cards keep their own size and leave ragged gaps.
- Span the big tiles. For a hero tile or wide chart, keep it on Fill container, then drag its edge until it snaps to the next cell, or type values in Column span and Row span. A 2×2 tile in a 4-column grid is the classic bento opener.
- Align items inside cells. If a card is smaller than its cell, use the alignment buttons in the Position section to pin it left, centred, right, top or middle within the cell.
- Lock empty cells when you need them. For a dashboard with an intentional gap, turn off Toggle automatic positioning on the grid frame. Cards then stay where you put them instead of sliding up to fill space.
- Test the resize. Drag the frame’s width. Fill tracks should share the space by their
frvalues and spanning tiles should stretch with them. If something stays put, check that the item is on Fill container. - Make breakpoint frames. Duplicate the frame for each breakpoint and change the column count (4 to 2 to 1). Figma’s grid article doesn’t describe an auto-fit option, so build each breakpoint explicitly. Our responsive design guide covers frame sizes.
- Annotate for handoff. Write the column template, gap and spans on the frame, using the mapping table below. Then run through the Dev Mode handoff checklist.
How fr sizing divides space
Figma uses the same idea as CSS fractional units. A track’s share is its fr value divided by the total fr on that axis. Three columns at 1fr each get a third of the width. Figma’s own example: five rows set to 1fr, 1fr, 1fr, 2fr, 2fr add up to 7fr, so each 1fr row gets one-seventh of the height and each 2fr row gets two-sevenths. In CSS, MDN describes fr the same way: each flex-sized track takes a share of the remaining space in proportion to its flex factor.
Fixed tracks are taken out first, then fill tracks share what’s left. So 240px 1fr 1fr keeps a 240px sidebar column, and the two content columns split the rest.
Map it to CSS grid for handoff
| Figma setting | Closest CSS | Note |
|---|---|---|
| Grid flow on frame | display: grid | |
| Columns: fill 1fr × 4 | grid-template-columns: repeat(4, 1fr) | |
| Columns: fixed 240, fill, fill | grid-template-columns: 240px 1fr 1fr | |
| Track with min/max | minmax(min, max) | Figma min/max sits on top of the resizing mode |
| Track set to hug | auto (closest) | Confirm with your developer, because content sizing differs between tools |
| Gap between rows / columns | row-gap / column-gap | |
| Padding | padding on the container | |
| Column span 2 | grid-column: span 2 | |
| Row span 2 | grid-row: span 2 | |
| Automatic positioning on | default auto-placement | Order follows layer order |
| Breakpoint frames 4 / 2 / 1 | media or container queries changing the template |
Treat this table as a starting point for the conversation, not generated code. Check what Dev Mode shows for your file.
A dashboard example
A common KPI dashboard: a 4-column grid, all columns 1fr, rows on auto, 24px gaps. Row one holds four KPI tiles, one per cell. Row two holds a line chart with a column span of 3 and an activity list with a column span of 1. Row three holds a table with a column span of 4. Every tile is set to Fill container. When the frame widens, every column grows equally. On the tablet frame, change to 2 columns and set the chart’s span to 2. For the tiles themselves, see account dashboard UI. For dense rows of data, the tables and data UI guide goes deeper.
Common mistakes
- Using layout guides and expecting reflow. A uniform layout grid doesn’t move anything. Use the grid flow.
- Cards left on fixed width. They won’t stretch with fill tracks, and a span won’t resize them. Set the cards to Fill container.
- Spanning without Fill container. Figma requires the child to be on Fill container before a span resizes it with the grid.
- Deleting a track to remove one card. Deleting a column or row deletes what’s inside it. Delete the card instead.
- Fighting automatic positioning. If cards keep jumping into gaps, turn automatic positioning off for that frame. Turning it back on resets rows to Auto.
- Nesting rows of horizontal auto layout to fake a grid. It works until a tile needs to span two rows. The grid flow handles spans directly. See auto layout in practice for when nesting still makes sense.
FAQ
Is grid auto layout the same as a layout grid in Figma?
No. Grid auto layout is one of three auto layout flows and actually positions and resizes layers. Layout guides, including the uniform grid, are visual aids that don’t move content.
How do I make one card span two columns?
Set the card to Fill container, then drag its edge across to snap to the next cell, or type 2 in Column span in the right sidebar. Use Row span for tall tiles.
Can a Figma grid change its column count automatically at breakpoints?
Figma’s grid documentation doesn’t describe an automatic auto-fit option. Build a frame per breakpoint with its own column count, and tell developers which CSS rule changes the template.
Next
You can now build two-dimensional layouts. Next, combine them with stacks in Figma auto layout in practice, apply them to a product grid with product listing and grid UI, or browse more in the Figma guides hub.
§ Keep reading