How to use auto layout in Figma
Learn how to turn several layers into one auto layout frame in Figma, then change the gap and direction so the layers stay evenly spaced as they change.

Quick answer
Select the layers you want to arrange, then turn on auto layout with the Toggle auto layout control in the Layout section of the Design panel. Figma wraps the layers in a frame. Then change the Horizontal gap between objects to set the spacing and pick Vertical to stack the layers.
Steps at a glance
- Select the layers in the Layers panel
- Turn on Toggle auto layout in the Design panel
- Find the new frame in the Auto layout section
- Enter a value in Horizontal gap between objects
- Choose Vertical to stack the layers
Interactive demo
Summary
Auto layout wraps layers in a frame that keeps them evenly spaced and aligned. You control spacing and direction from the Design panel, so layouts adjust without manual nudging.
Step-by-step guide
Step 1
Select the layers
Open the Layers panel on the left and click one of the layers you want to arrange. Add the others to the selection until the Design panel shows 3 selected. You can also select every layer on the page at once.
Step 2
Add auto layout
In the Design panel, find the Layout section and click Toggle auto layout. Figma groups the selected layers into a new frame and lines them up in a row.
Step 3
Set the gap between layers
The new Frame 1 now shows an Auto layout section in the Design panel. Click the Horizontal gap between objects field and type a number, such as 24, to set the space between each layer.
Step 4
Change the direction
In the Auto layout section, pick Vertical to stack the layers in a column instead of a row. The other choices in the same control are Horizontal and Grid.
Why this matters
You have a row of buttons or cards that you keep nudging by hand to keep the spacing even. Auto layout fixes the gap in one place, so adding, removing, or resizing a layer never leaves your design misaligned.
Frequently asked questions
Does auto layout create a new frame?
Yes. In this walkthrough, turning on auto layout for the three selected layers produced a new frame called Frame 1 that holds them.
Can I change the direction after adding auto layout?
Yes. The Auto layout section lists Freeform, Vertical, Horizontal, and Grid, and you can switch between them at any time.
Related guides
Continue with more step-by-step guides for getting work done.
How to create a frame in FigmaLearn how to create a frame in Figma: pick the Frame tool, draw it on the canvas, and set its width in the Design panel on a free account.
How to duplicate objects in FigmaLearn how to duplicate objects in Figma from the Edit menu, then drag the copy aside, using a simple rectangle you can follow on the free plan.
How to export a Figma file as PDFExport a Figma design file as a PDF in four steps: add export settings, open the file type menu, choose PDF, then click Export. Works on a free plan.
How to use a mask in FigmaLearn how to use a mask in Figma: select two overlapping shapes, choose Use as mask, and clip the top shape to the one below it in the Layers panel.
How to use the pen tool in FigmaLearn how to use the pen tool in Figma: pick Pen, click points on the canvas, close the path, and find the finished vector in the Layers panel.
How to add a color style in FigmaLearn how to add a color style in Figma: open Styles in the Design panel, create a new color style, name it, set a hex value, and find it listed.
Create interactive demos like this one — free, no coding required.
Start for free →