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
| Setting | What it controls |
|---|---|
| Direction | Horizontal, vertical or wrap |
| Gap | Space between items (or "Auto" for space-between) |
| Padding | Space between the frame's edge and its content |
| Alignment | Where items sit inside the frame |
| Resizing | Hug, fill or fixed, for width and height |
Hug vs fill vs fixed
This is the part that confuses people most.
| Option | Behaviour | Typical use |
|---|---|---|
| Hug contents | Size follows the content | Buttons, tags, chips |
| Fill container | Stretches to fill the parent | Inputs, cards in a list, text that should wrap |
| Fixed | Stays a set size | Icons, 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:
- A vertical frame (the card) containing
- A horizontal frame (avatar and name), plus
- Text, plus
- 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
| Mistake | Fix |
|---|---|
| Using spacer rectangles | Use gap and padding instead |
| Everything set to fixed | Use hug and fill so layouts adapt |
| Deep, unnamed nesting | Name frames and flatten where possible |
| Ignoring text resizing | Set text to fill width and hug height |
| No min or max widths | Add 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.