Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • Courses, tutorials, projects – Figma Learn
  • Courses
  • Figma Design for beginners

FD4B: Auto layout fundamentals

Written by Figma Man

Updated at June 19th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Administration – Figma Learn
    Manage files and projects Manage a team Manage your account Manage a Figma organization Manage Enterprise plan settings and permissions Billing Manage Figma in a school
  • Figma Design – Figma Learn
    Create prototypes Import and export Create designs Tour the interface Dev Mode Work together in files Build design systems Figma Draw
  • Get started – Figma Learn
    Set up your account Layers 101
  • FigJam – Figma Learn
    Import and export Run meetings Work on boards Tour the interface
  • Community – Figma Learn
    Explore the Community Creator tools and resources
  • Help – Figma Learn
    Troubleshoot Common questions Work with support
  • Work across Figma – Figma Learn
    Figma AI Work across Figma
  • Courses, tutorials, projects – Figma Learn
    Courses Projects
  • Figma Slides – Figma Learn
    Create and edit slides Present slide decks Tour the interface Import and export
  • Figma Buzz – Figma Learn
    Templates in Figma Buzz Create and edit assets in Figma Buzz Overview
  • Figma Make – Figma Learn
    Tour the interface Work with Figma Make
  • Figma Sites – Figma Learn
    Design a site Create webpages and breakpoints Make your site interactive Preview and publish a site Tour the interface
+ More

Table of Contents

Lesson overview Auto layout fundamentals Try it out! Check your knowledge

Lesson overview

In this chapter, we’ll use auto layout to build a responsive button element that automatically grows and shrinks as its label changes. We’ll then turn the button into a main component so we can reuse it in other designs.

This is the button we're going to build.png

Here’s the button we’re going to build. To recreate this design, it seems like we could use a rectangle for the background, a text layer for the label, and a frame to keep it all together. The outcome might look ok, but it won’t really work if we need to change the button label in the future.

Instead, we’ll use auto layout to create a frame around our text layer and give it a fill to act as the surface of the button.

Auto layout fundamentals

Auto layout helps you organize, arrange, and space out design elements so that they adjust automatically as you make changes, saving you time and making your designs responsive and adaptable.

You can apply auto layout to a frame or a selection of layers using the keyboard shortcut Shift A. This adds the selected layers to a parent frame with auto layout applied. We can then use auto layout to determine how the parent frame interacts with its child layers.

We can set the Direction of the frame’s child layers to flow vertically, horizontally, or allow layers to wrap to a new line.

three sets of designs, all with the same elements: three circles, one pink, one yellow, one green. The first set of circles are placed in a vertical direction. The second set of circles are placed in a horizontal direction. The third set of circles are wrapped, with the pink and yellow circles in the first row, and the green circle in the second row.

We can adjust the left, top, right, and bottom Padding of our design to create visual spacing between the child layer and their parent frame.

A light-green blog card asset containing a title, description, and a read more button. Auto layout is applied to this asset. The keyboard shortcut for changing padding on all sides displays below it. A cursor uses that keyboard shortcut while clicking and dragging the top pink handle of the auto layout frame.

We can also adjust the spacing, or Gap, between child layers and choose how those layers are Aligned within the parent frame. And, we can control how an object’s height and width resizes when changes occur.

In a Figma Design file, a frame contains a blog post card. Within it is a pink rectangle, title text, description text, and three topic tags. The topic tags are in their own auto layout frame, set to wrap. A cursor clicks into the horizontal gap between field in the right panel and changes it to Auto. The topic tags spread out horizontally to fill its parent container.

A parent frame can have a Fixed height or width, or it can be set to Hug its child layers so that it grows or shrinks as those layers change. A child layer’s height and width can be Fixed, set to Fill its parent frame or, if it contains its own child layers, set to Hug those layers instead.

a layer inside a mobile frame is selected. A box highlights the resizing section of the right panel.

You can combine different resizing options to customize how a layer behaves. For example, imagine an app notification. To make sure the notification frame stays a consistent width while accommodating a longer message, you can set its width to Fixed and its height to Hug contents.

Together, these auto layout properties help your designs be more flexible as changes happen throughout the design process and beyond. Learn more about auto layout properties. 

Try it out!

Try getting hands on and use the interactive sandbox below to learn how auto layout works. Keep in mind this doesn’t fully replicate how auto layout works in Figma Design and is meant for learning purposes only.

Check your knowledge

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • FD4B: Advocate sidebar: The differences between sections, groups, and frames
  • FD4B: Advocate sidebar: Auto layout tips and tricks
  • FD4B: Create a frame using frame presets
  • FD4B: Create the section heading, paragraph text, and quote block
  • FD4B: Prototyping fundamentals
  • Blog
  • Best practices
  • QR code generator
  • Color wheel
  • Colors
  • Color picker
  • Color palettes
  • Color palette generator
  • Color contrast checker
  • Font Library
  • Templates
  • Developers
  • Integrations
  • Affiliate program
  • Resource library
  • Reports and insights
  • Support
  • Status
  • Legal and privacy
  • Modern slavery statement
  • Climate disclosure statement
  • COMPARE
  • Sketch
  • Adobe XD
  • Framer
  • Miro
  • COMPANY
  • Events
  • Customers
  • Careers
  • Newsroom
Expand