UI/UX Design with Figma: How Auto-Layout Saves Your Layout and Where Beginners Break It

Have you ever opened a Figma file, changed the frame width — and watched buttons slide out of place, text overlap icons, and spacing turn into a mess? A familiar pain. Especially if you had carefully arranged everything by hand before. In this article, we'll break down how auto-layout works in Figma, why it saves hours when adapting an interface, and what mistakes beginners most often make. And we'll also find out when it's easier to do without it.

What is auto-layout and why you can't build a responsive Figma interface without it

Imagine you're designing a product card: image, title, price, and a "Buy" button. You assembled everything manually, placing each pixel. Now you need to make the same card for mobile — width not 300 but 160 pixels. You start moving each element, adjusting spacing, and it takes twenty minutes. What if there are ten cards? What if the design system requires three sizes? Manual work turns into endless fiddling. More on the topic: “LLM as a Design Partner: Prompts for Figma Variables, Nielsen Heuristic Audits, and Handoff Specs That Actually Work”.

Auto-layout is a mechanism that turns a group of layers into a "smart" container. You set the direction (horizontal or vertical), the spacing between elements, and the padding, and Figma automatically rearranges the content when the size changes. Essentially, you describe the rules once, and then the layout follows them without your involvement. More on the topic: “Figma, Tokens, and Handoff: 12 LLM Prompts That Turn a Text Model Into a UI/UX Co-Pilot”.

Inside auto-layout there are three sizing modes for each element: Hug (hug contents), Fill (fill available space), and Fixed (fixed size). Understanding these modes is the key to keeping your layout from breaking.

Anatomy of auto-layout: direction, spacing, and the three sizing modes

The direction sets the axis along which elements are arranged. Horizontal — for navigation bars, button rows, cards in a list. Vertical — for forms, articles, menus. You can nest frames inside each other to create complex grids.

Spacing comes in two types: padding (inner spacing of the container) and gap (distance between child elements). If you're used to setting spacing manually on each layer, try setting it in auto-layout — it enforces discipline and speeds up edits.

Sizing modes are the most important part. Fixed — the element keeps its specified width and height regardless of the container. Hug — the size adjusts to the content (for example, a button hugs its text). Fill — the element stretches to fill the available space (for example, an input field in a search bar).

By combining these modes, you can build a truly responsive interface. But if you make a mistake, the layout will fall apart on the first resize.

The rule that saves layouts If an element should change size with the container — set Fill. If it should stay the same — Fixed. If it adjusts to its own content — Hug. Don't mix them unnecessarily.

Why the layout breaks when the width changes: three typical mistakes

Mistake one: Fixed everywhere. Beginners often set fixed sizes on all elements because it's easier to control the appearance. But as soon as you change the frame width, the content either overflows the boundaries or remains a small island in the void. This is especially painful on cards with text: the title doesn't wrap because the text layer has a Fixed width, while the container has shrunk.

Mistake two: Hug where Fill is needed. A classic — a button in a form footer. If you set Hug for width, it will hug the text and look tiny on a wide screen. But if you set Fill, it will stretch to the full available width, which is usually what you want.

Mistake three: nested frames without considering modes. For example, you created a horizontal auto-layout for a row with an icon and text. You set the icon to Fixed and the text to Fill. Seems logical. But if the container shrinks too much, the text will start wrapping line by line, while the icon sticks out. The fix is to set a minimum width for the text or move it into a separate vertical container.

To avoid these mistakes, it's useful to check the layout at different sizes right after assembling it. And that's where components and variants come to the rescue.

How auto-layout relates to components and the design system

Components in Figma are reusable interface elements. When you create a button component, it already has auto-layout inside. By changing the text or icon, you don't break the structure. And variants allow you to store different states: a regular button, a button with an icon, a button in a loading state. More on the topic: “Your Figma File Is a Contract, Not a Picture: 12 LLM Prompts That Catch Handoff Blunders Before They Cost You a Sprint”.

A design system is built on components with well-thought-out auto-layout. If each component behaves predictably when resized, the whole system becomes flexible. Developers get a layout that easily translates into code, and designers spend minutes adapting new screens instead of hours.

However, not everything needs to be automated. Sometimes it's easier to set fixed sizes for decorative elements — for example, illustrations or background overlays. The main thing is to understand where auto-layout gives an advantage and where it creates unnecessary complexity.

When auto-layout saves hours and when it's easier without it

Auto-layout is indispensable for repeating elements: cards, lists, navigation menus, forms. If you're building a page with ten identical blocks, auto-layout will save you at least an hour of manual work with every change.

But there are cases when it only gets in the way. For example, complex compositions with overlapping elements where the exact position of each layer matters. Or static banners that won't change size. Or print layouts where dimensions are strictly fixed.

In such situations, you can use groups instead of auto-layout frames. But remember: a group doesn't rearrange on resize, so if the layout needs to be responsive, it's better to spend time setting up auto-layout.

Comparison of size modes in auto-layout

ModeBehaviorWhen to use
FixedFixed size, does not changeIcons, decorative elements
HugSize to contentButtons with text, tags
FillFills the available spaceInput fields, cards in a list

Checklist for converting a finished layout to auto-layout

If you already have a manually assembled layout and want to convert it to auto-layout, proceed step by step:

  1. Group logical blocks. Determine which elements should move together (for example, the icon and text in a button).
  2. Start from the innermost level. First set up auto-layout for small groups (button, tag), then for larger ones (card, section).
  3. Set direction and spacing. Check that padding and gap match your design.
  4. Configure sizing modes. For each element inside auto-layout, choose Hug, Fill, or Fixed depending on the behavior.
  5. Test by resizing. Change the container width and see what breaks. Fix the problem areas.
  6. Check at different resolutions. Make copies of the frame with widths of 320, 768, and 1440 pixels — this way you'll see how the layout behaves.

This checklist helps you not miss important details. Over time, you'll do these checks automatically.

A quick-check lifehack In Figma, you can enable "Layout Grid" mode and see how elements align to the grid when resized. This helps you notice that some layer is out of place.

How not to drown in auto-layout: a learning path

Self-studying Figma and auto-layout is a real path, but it requires discipline. You'll run into confusing behaviors, google, watch scattered videos. At some point it will seem that everything works, but when assembling a real project, dozens of little things will surface.

Courses provide structure and feedback. For example, in the course UI/UX Design with Figma they cover exactly such practical scenarios: how to set up auto-layout so cards don't break, how to link components with variants and build a design system. The training is built on personalized lessons: if you're already familiar with the basics, the material gets more complex, and if something is unclear, you can return to the fundamentals. This saves time compared to randomly going through tutorials. More on the topic: “UI/UX Design with Figma: How to Master Interface Design Without Stepping on the Rakes”.

But there are alternatives: intensive workshops, mentorship, working in a team on a real project. Each path has its price — time, money, the need for motivation.

Who should master auto-layout and who can wait

Auto-layout is a must-have for a UI designer working with web interfaces and mobile apps. If you build landing pages, dashboards, interfaces for SaaS — without it you'll spend too much time on routine.

If you only do graphic design (banners, illustrations, print), you're unlikely to need auto-layout. You can also postpone learning it if you're just taking your first steps in Figma and haven't yet figured out the basic tools. But as soon as you move on to interface prototypes — come back. More on the topic: “Figma Without a Designer: How LLMs Turn Wireframes Into a Component System, Accessible UI, and Handoff-Ready Specs”.

Ultimately, auto-layout is not just a feature but a way of thinking. It teaches you to think of a layout as a system of rules, not a set of static pictures. And that mindset is what distinguishes a designer who can quickly adapt an interface to any device from one who starts from scratch every time.

If you want to master this approach systematically, with practice and feedback, check out the course UI/UX Design with Figma — there auto-layout, components, and design systems are covered with real examples.

← All posts

Ask AI about this article

Ask a question about this article — ASI Biont will answer based on its text.