Figma Auto Layout Explained for Beginners

Learn how Figma Auto Layout works, set direction, gaps, padding and resizing, then build a flexible button and card with a simple beginner exercise.

Published November 23, 2026Updated November 23, 20268 min read
UX Design
Illustration for the article Figma Auto Layout Explained for Beginners.

Change a button label in a carefully drawn Figma screen and the surrounding elements may suddenly look wrong. Auto Layout gives those elements rules so they can move and resize with the content.

Figma Auto Layout arranges layers inside a frame according to direction, gap, padding, alignment and resizing settings. It is useful for buttons, cards, lists and larger page sections because you can edit content without manually repositioning every neighbour. If you are new to UI design, the easiest way to learn it is to build one small component and deliberately change its text.

Auto Layout at a glance

  • Flow decides whether items run vertically, horizontally or in a grid.
  • Gap separates items; padding separates items from the frame edge.
  • Alignment controls where items sit within the available space.
  • Hug contents, Fill container and Fixed control what happens when content or frame size changes.
  • Always test a longer label and a narrower frame before trusting the layout.

01 What does Auto Layout actually do?

Imagine two buttons in a row. In a manually positioned design, changing the first label may make it run into the second button. In an Auto Layout frame, the row maintains its chosen gap as the first button grows. The frame's rules determine whether the row itself grows, stays at a fixed width or distributes available room among its children.

Auto Layout works on frames and the layers inside them. You can nest one Auto Layout frame inside another: a horizontal icon-and-label row inside a button, for example, and several buttons inside a vertical panel. This nesting is the key to building a whole card or page section without treating every screen as a collection of fixed coordinates.

It is a layout tool, not a substitute for deciding what the interface should say or how it should work. Start with a clear wireframe or content hierarchy, then use Auto Layout to make that structure easier to revise.

02 The four controls to learn first

Direction and flow

A vertical flow stacks items from top to bottom, which suits a card with a heading, description and action. A horizontal flow places items side by side, which suits a button with an icon and label or a row of navigation items. Figma also offers a grid flow for more structured two-dimensional arrangements. For a first exercise, use vertical and horizontal flows until you can predict how the layers will move.

Gap and padding

Set the gap to control space between children. Set padding to control the space between the children and the edges of their parent frame. If a button label looks crowded, increase its padding. If two cards look too close together, change the gap on their parent frame. These are different decisions, even if both make a design feel less cramped.

Alignment

Alignment determines where children sit across the frame. In a horizontal button, centring the icon and label helps keep them balanced as the button height changes. In a vertical card, left alignment may make the heading, description and action easier to scan. Inspect alignment again whenever you change a frame from Hug contents to Fixed or Fill container, because the extra room can make an earlier setting more obvious.

Resizing

Hug contents makes an Auto Layout frame size itself around its children and padding. Fill container lets a child use available space inside an Auto Layout parent. Fixed keeps a specified dimension. These settings can differ by axis: a card might have a fixed width while its height hugs changing text.

A useful mental check is to ask, “Which thing should grow?” For a button with a longer label, the button may need to hug the text. For a card within a wider column, the card may need to fill its parent horizontally while hugging its content vertically. Fill container is a child setting, so check that the layer actually sits inside an Auto Layout parent.

Interface layout showing outer padding, gaps between stacked cards and a horizontal row nested inside a vertical frame

03 Build your first flexible button

Open a Figma Design file and make a text layer labelled “Explore course”. Select it and press Shift + A, or use Add auto layout in the right sidebar. Figma creates an Auto Layout frame around the selection. Give the frame a fill and rounded corners so you can see the button boundary.

  1. Check the frame: keep the button frame on Hug contents for width and height.
  2. Add padding: give the label room on all four sides. Use your design's spacing scale rather than choosing values at random.
  3. Test the label: change “Explore course” to “Explore the professional design course”. The button should grow to fit.
  4. Add an icon if useful: put it beside the label in a horizontal flow, set a gap, and align the two items centrally.
  5. Test a narrow parent: place the button in another Auto Layout frame and resize that parent. Decide whether the button should wrap, fill the available width or stay content-sized.

If the text clips or the button does not grow as expected, select the text layer and its parent separately. A fixed child width, fixed parent width or conflicting sizing choice can explain the result. Change one setting at a time so you can see which rule controls the behaviour.

04 Extend the button into a card

Now place a heading, a short course description and your button inside a new vertical Auto Layout frame. Set a consistent gap between the items and padding around the card. Give the card a fixed width and let its height hug the content. Replace the description with a longer, realistic sentence. The button should move down while the card grows vertically.

Duplicate the card and change the title and description in the copy. You should be able to compare two content lengths without realigning each layer by hand. Then put both cards in a horizontal parent frame and inspect what happens as the parent narrows. This is where you decide whether the cards should stay in a row, wrap or use a different arrangement. Auto Layout supports the rules you choose; it does not choose the best mobile design for you.

For a broader view of how layout decisions fit into screen design, see these beginner UI design principles and the guide to spacing and alignment.

05 Common Auto Layout mistakes

  • Using Fixed everywhere: a fixed size can hide overflow until the copy changes. Let content drive size where appropriate and test a longer label.
  • Confusing gap with padding: inspect the parent frame when items are too close together; inspect its inner padding when content touches the edge.
  • Expecting Fill container outside a parent: Fill container applies to a child of an Auto Layout frame. Check the layer hierarchy first.
  • Adding Auto Layout to every layer at once: begin with a button or card, confirm its behaviour, then nest it in a larger frame.
  • Judging only one screen width: resize the parent, replace short text with realistic content and inspect where the layout stops working.

The best test is a content change that would break a manually arranged design. If the layout adapts predictably, your rules are doing useful work. If it does not, look at the parent-child relationship and the sizing choice on each axis.

Want to practise Auto Layout in real interface projects? Explore Zolve Academy's Professional UI/UX Design & AI-Powered Workflow Program, review the curriculum, and use the course enquiry option to discuss your learning goals.

FAQ

Common questions about Figma Auto Layout Explained for Beginners

A quick summary of the most common questions readers have about this topic.

Auto Layout is a set of rules for arranging layers inside a frame. You choose a flow, spacing, padding, alignment and sizing behaviour so the frame can adjust when its contents change.

Select a frame or one or more layers and press Shift + A, or choose Add auto layout in the right sidebar. Then check the flow and sizing settings Figma applies rather than assuming the first result is correct.

Gap is the space between items inside an Auto Layout frame. Padding is the space between those items and the frame's outer edges.

Use Hug contents when a frame should grow with its content, such as a button. Use Fill container for a child that should use available room in its Auto Layout parent. Use Fixed when an element needs a specified dimension.

No. Auto Layout helps elements respond to content and frame changes, but you still need to choose sensible sizing rules, test narrow and wide frames, and decide how the layout should change at different sizes.