Why Auto Layout breaks in Figma and how to fix it
Introduction
You pressed Shift + A, but now your text is running off the screen, or your icon is smushed. Auto Layout logic is strict; if you give it conflicting instructions, it breaks visually.
This guide identifies the most common reasons why an Auto Layout frame 'fails' and provides the direct fix for each.
Guide Steps
The Problem: Text overflows the container
You added a long paragraph to a card, but instead of making the card taller, the text just runs horizontally across the screen, ignoring the card's width.
The Solution: Check resizing modes
This happens because the text layer is set to 'Hug contents' horizontally. Change the text layer's horizontal resizing to 'Fill container'. This tells text to stop at the edge of the parent and wrap to the next line.
The Problem: Frame doesn't grow with content
You added more items to a list, but they are getting cut off or spilling outside the boundary of the background.
The Solution: Vertical Hug
The parent frame is likely set to 'Fixed height'. Change the vertical resizing of the parent frame to 'Hug contents'. It will now snap to fit exactly around its children.
What to avoid
Avoid manually setting the width or height of text boxes inside Auto Layout. Always rely on 'Fill' or 'Hug' logic to ensure it adapts to content changes.
Pro-Level Design Tips & Workflows
💡 Canvas Shortcut: Select any parent Auto Layout frame and double-click the inner padding lines directly on the canvas to set sizing values visually without clicking the sidebar.
💡 Spacing Variables: Always bind padding and gap spacings to dynamic variables (e.g. space/8 or space/16) to support system theming scaling.
Practical UI Example & Screenshot Checklist
Here is a real-world scenario where you will apply these exact layout rules:
Build a container frame with a logo and menu links. Set Auto Layout horizontal direction, padding margins to 24px, and select 'Space between' alignment to keep elements pinned to the margins.
- ✓ Inspect the right-hand design variables sidebar.
- ✓ Verify child width dropdown is set to
Fill container. - ✓ Drag the parent frame width to verify elements adapt automatically.
Glossary of Core Design Terms
A sizing constraint instructing the container frame boundaries to fit around child layers automatically.
A responsive instruction that stretches child layers to consume the remaining horizontal space of its parent flex frame.
The primary component template source. Updates to the master component propagate across all visual instances.
Figma Templates & Resources
Figma Starter Playground (.fig)
Includes pre-built design grids, responsive card examples, and button variant frames.