Auto Layout
UI DesignWhat 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.
Related terms
View all UI Design terms →Component Variants
Component variants are versions of one component grouped into a single set , such as a button in different sizes, states and colors. In…
Component Properties
Component properties are the parts of a component that users are allowed to change . In Figma, they appear as one set of controls in the…
Spacing System
A spacing system is a fixed set of spacing values that a product uses for margins, padding and gaps. Instead of picking any number…
Component Library
A component library is a shared set of reusable UI elements , such as buttons, inputs and cards. It can live in a design tool, in code, or…
Responsive Web Design
Responsive Web Design (RWD) is an approach to web design that ensures web pages render well across different devices and screen sizes. It…
Design Handoff
Design handoff is the step where designers pass finished designs to developers to build. It includes the screens, specs, assets, states…
