Skip to content

Auto Layout from scratch

Manual alignment works until the content changes. Then it all falls apart at once. Auto Layout is how you stop hand-positioning things.

A profile card with manual positioning versus Auto Layout when the name gets longer โ€” Manual โ€” breaks on longer textManual โ€” breaks on longer textAuto Layout โ€” reflows

Drag to compare. The name on the right is longer in both โ€” only Auto Layout adapts.

  1. Create a frame. Press FF and drag out a frame roughly 320ร—160.

    An empty frame drawn on the Figma canvas with the frame tool active
    Any size will do โ€” Auto Layout will take over sizing shortly.
  2. Add your content. An avatar (a circle is fine), a name and a role. Do not worry about aligning them yet; that is the point.

  3. Select the three layers and apply Auto Layout with โ‡ง+AShift+A. Figma immediately stacks them and takes over their positions.

    The three layers stacked vertically after Auto Layout is applied
    Figma guesses a direction from the current arrangement. It is often wrong โ€” fix it next.
  4. Set the direction to horizontal in the right panel, then set the gap to 12 and padding to 16.

  5. Set the text to โ€œHug contentsโ€ and the frame to โ€œFixed widthโ€. Now type a much longer name. The layout absorbs it instead of overlapping.

    The card reflowing correctly with a much longer name
    This is the whole payoff: content changes, layout holds.
  6. Nest it. Select the name and role, apply Auto Layout to just those two, and set that inner frame to vertical. Nested Auto Layout is how real components are built.

Auto Layout

Add Auto Layoutโ‡ง+AShift+A
Remove Auto Layoutโ‡ง+โŒฅ+AShift+Alt+A
Select child layerโŽEnter
Select parent frameโ‡ง+โŽShift+Enter
Duplicate in placeโŒ˜+DCtrl+D

Check your understanding

2 questions ยท self-check, not graded

1Your Auto Layout frame has a fixed height, and adding a third line of text causes it to overflow. What is the fix?

2Why nest Auto Layout frames instead of putting every layer in one?