Auto Layout and Constraints
Level 2 · Designing screens
How frames, Auto Layout and resizing rules make a screen design bend instead of break. Why a button should grow when its label does.
Course contentsLesson 5 of 12
Level 1 · Picking a design app
Level 2 · Designing screens
Level 3 · Drawing and editing
Level 4 · Boards and diagrams
After this lesson you can
- Set up a frame for one screen
- Make a button grow with Auto Layout
- Pin a layer to a corner
11 mincovers 3 glossary entries
Worth reading first: Figma, Sketch and Penpot
How a design grows to fit its content
Auto Layout is a Figma feature that lines things up in a row or a column, with set gaps and padding. When the content changes, the box grows or shrinks to fit. Type a longer word into a button with 16 pixels of padding, and the button gets wider. The padding stays 16.
It all happens inside a box of fixed size called an artboard. Figma calls it a frame. Each one stands for one page or one screen, such as a phone screen 390 pixels wide. One file can hold dozens of them side by side, so you see a whole flow at once.
Without Auto Layout, every change is done by hand. Make a label longer and you must widen the button, then move the button next to it, then the one after that. With Auto Layout, the row makes room by itself. A list adds an item and pushes the rest down.
Resizing constraints handle the other half. They are rules for what a layer does when its frame changes size. A layer can stay pinned to an edge, stay in the center, or stretch. Pin a Send button to the bottom right, and it stays in that corner on a tall phone or a short one.
Together they let you test one screen at many sizes. Drag the frame wider, as if the phone were a tablet. Pinned parts stay put, stretchy parts stretch, and rows reflow. Anything that breaks shows you where the real app will break too.
Auto Layout works much like the way web pages are built. Developers line things up in rows and columns with gaps. A design made this way is easier for them to copy, because the rules are already the same.
The common mistake is to skip it until the end. A screen built by hand looks fine until a word changes, and then everything has to be nudged. Set up Auto Layout first, on small parts like buttons, and build bigger parts out of them.
Worked example
A menu that survives translation
Tom's app menu has 5 buttons with Auto Layout, each with 12 pixels of padding. The app is then translated into German.
Settings becomes Einstellungen, a much longer word. Each button grows to fit, and the row stays neat with no one touching it.
The words for this lesson3
Check yourself
What does Auto Layout do when a button's label gets longer?
Finished this lesson?
Marking it complete also marks its 3 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.