Designers5 min

Figma Auto Layout: a practical guide for responsive designs

A practical Figma Auto Layout guide: direction, spacing, padding, hug vs fill vs fixed, wrap, min and max sizes, nesting and common mistakes to avoid.

Saurabh YadavFounder, Design Studio by Saurabh
DesignersFigma Auto LayoutResponsive designFigma tips
Share

Auto Layout is the Figma feature that separates fast designers from frustrated ones. It makes frames behave like real interfaces: buttons that grow with their labels, lists that reflow when you add items, cards that adapt to different screen widths.

Here's a practical guide to the parts that matter most.

What Auto Layout does

Auto Layout arranges a frame's children in a row or column, with consistent spacing and padding, and resizes the frame based on its content. Add Auto Layout with Shift + A.

Think of it as Figma's version of CSS flexbox. If you understand one, the other feels familiar, which makes developer handoff much smoother.

The core settings

SettingWhat it controls
DirectionHorizontal, vertical or wrap
GapSpace between items (or "Auto" for space-between)
PaddingSpace between the frame's edge and its content
AlignmentWhere items sit inside the frame
ResizingHug, fill or fixed, for width and height

Hug vs fill vs fixed

This is the part that confuses people most.

OptionBehaviourTypical use
Hug contentsSize follows the contentButtons, tags, chips
Fill containerStretches to fill the parentInputs, cards in a list, text that should wrap
FixedStays a set sizeIcons, avatars, fixed-width sidebars

A button usually hugs its label. A text field usually fills its container. A card in a list fills the width and hugs its height.

Tip

When something won't resize the way you expect, check the resizing setting on both the child and the parent. Most Auto Layout problems are a "hug" that should be a "fill", or the other way round.

Min and max width

Set min width and max width to keep layouts sensible: a button that never gets too narrow, or a text column that never gets too wide to read. These map nicely to CSS min-width and max-width.

Wrap

Horizontal Auto Layout can wrap items onto new lines, like tags or a grid of cards. Combined with fill and min width, wrap lets you build layouts that adapt across screen sizes.

Absolute position

Sometimes one element needs to break out of the flow, like a notification badge on an icon or a close button in a corner. Turn on absolute position for that child, and it ignores Auto Layout while staying inside the frame.

Nesting: how real layouts are built

Real screens are Auto Layout frames inside Auto Layout frames. A card might be:

  1. A vertical frame (the card) containing
  2. A horizontal frame (avatar and name), plus
  3. Text, plus
  4. A horizontal frame (buttons).

Name your frames as you go ("Card", "Header", "Actions"). Your future self, and your developers, will thank you.

Auto Layout in components

Combine Auto Layout with components, variants and variables, and you get a design system that's quick to use and hard to break. For example, one button component with variants for size and type, using Auto Layout so the label can change freely. My guide to setting up a Figma design system goes further.

Common Auto Layout mistakes

MistakeFix
Using spacer rectanglesUse gap and padding instead
Everything set to fixedUse hug and fill so layouts adapt
Deep, unnamed nestingName frames and flatten where possible
Ignoring text resizingSet text to fill width and hug height
No min or max widthsAdd them to protect layouts at extremes

Work with us

Want this set up properly? Our design system agency builds Figma libraries, tokens and documentation that scale with your team.

FAQ

What is Auto Layout in Figma?

Auto Layout is a Figma feature that arranges a frame's contents in a row, column or wrapping grid with consistent spacing and padding, and resizes the frame based on its content. It works much like flexbox in CSS.

What is the difference between hug and fill in Figma?

Hug makes an element size itself to its content, like a button that grows with its label. Fill makes an element stretch to fill the available space in its parent, like an input field spanning a form's width.

How do I make a responsive design in Figma?

Use Auto Layout with fill container for flexible elements, min and max widths to keep sizes sensible, wrap for grids of items, and constraints or layout grids for the page structure. Test by resizing frames to different device widths.

Key takeaways

  • Auto Layout makes Figma frames behave like real, responsive interfaces.
  • Master hug, fill and fixed; most problems come from these settings.
  • Use min and max widths and wrap for adaptive layouts.
  • Nest named frames to build real screens.
  • Combine Auto Layout with components for a robust design system.

What to do next

Rebuild one screen from your current project with Auto Layout only, no spacer rectangles, and resize it to phone and desktop widths. If you'd like help setting up a scalable Figma system, get in touch.

Saurabh Yadav's Memoji

Written by

Saurabh Yadav

Founder of Design Studio by Saurabh, a UI/UX design studio in India. We design apps and websites that feel effortless, from research to shipped pixels. Most recently: Pukaar.ai, as seen on Shark Tank India, and the Demerara Bank app.

Keep reading

All articles →