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

  1. Select the layers in the Layers panel
  2. Turn on Toggle auto layout in the Design panel
  3. Find the new frame in the Auto layout section
  4. Enter a value in Horizontal gap between objects
  5. Choose Vertical to stack the layers

Interactive demo

Loading 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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Create interactive demos like this one — free, no coding required.

Start for free →