Skip to main content

Auto Layout

UI Design

What is Auto Layout

Auto Layout is a Figma feature that arranges elements in a frame automatically. You set the direction, spacing, padding and alignment, and the frame adjusts by itself when content changes.

How Auto Layout works

  • Direction: Vertical, horizontal or grid flow
  • Spacing: A fixed gap between items
  • Padding: Space between the items and the frame edge
  • Resizing: Frames can hug their content or fill the space
  • Wrap: Items move to a new row when they no longer fit

When to use Auto Layout

Use it for anything that changes with content: buttons with different labels, lists, cards, forms and navigation bars. Build components with auto layout so instances stretch correctly. For overlapping items, such as a badge, use absolute position.

Benefits of Auto Layout

Designs respond to content like real code does, which saves time and makes handoff clearer for developers who think in flexbox and grid.

Frequently asked questions

What does auto layout do in Figma?

Auto layout arranges the elements in a frame by direction, spacing, padding and alignment. When you add, remove or resize content, the frame adjusts by itself, so you do not move elements by hand.

Is Figma auto layout the same as CSS flexbox?

Not exactly, but the ideas are close. Both stack items in a row or column with gaps, padding and alignment, so designs built with auto layout are easier for developers to translate into code.

Can an element ignore auto layout?

Yes. You can set an element to absolute position, much like absolute position in CSS. Use this for badges or other items that overlap the layout.