~/wiki / figma-i-makety / auto-layout-polnoe-rukovodstvo

Auto Layout: Why without it you lose hours on what should take minutes

Main chat

A chat for vibe coders: news, guides, live cases, marketplace, and finding executors.

$ cd section/ $ join vibe dev
Auto Layout: Why without it you lose hours on what should take minutes - обложка

Open any project where the layout was drawn without Auto Layout. Move the block by 8 pixels to the right - and everything will go: indentations curves, buttons of different heights, the text came out behind the card. The designer sits and manually moves 40 elements to return the grid. In an hour, he'll shut down Figma and go out for coffee with the face of a man who just lost half a day's work.

This is the main cost of working without Auto Layout. Not “less beautiful,” not “not according to guidelines,” but literally the hours and days a week you spend manually editing what the system has to do. And the worst part is that you don't notice it until you sit on a well-assembled file and see how slow you've lived before.

Auto Layout is not a feature for design geeks. This is the basic literacy of a product designer in 2025, on a par with components and styles. Without it, you are either slow or inaccurate or both.

Why you're wasting time without Auto Layout

The problem is not one action, it is that these actions are repeated dozens of times a day and accumulate.

What exactly are you doing with your hands

Walk your usual day at Figma. If the layout is made of fixed frames, you regularly:

  • Change the text in the button and adjust its width to the new text
  • Add a item to the list and shift everything below by the right number of pixels
  • Change the header of the card for a longer one and turn the card manually
  • You adjust the indentations between the elements, counting the difference in the inspector
  • Redesign the mobile version because the desktop doesn’t stretch back
  • Fixing the net after someone moved one block and didn't put it back in place

Each of these actions is seconds or minutes. But in a week running enough that would be enough for a separate screen.

Why it doesn't just hit speed

Manual layout is also a source of micro-errors, which then pop up on a review or in production:

  • Retreat 14 instead of 16 because the eye didn't notice
  • Buttons of different heights in one float
  • Text that in real data climbs out of the container because there was a short line in the layout
  • Uncoordinated paddings between similar cards

The developer looks at this and asks the right question: "So 14 or 16?" And you spend another hour checking in.

What is Auto Layout in simple words

Auto Layout – these are the rules by which the frame decides how to arrange and what size to make content. You set the direction (horizontal or vertical), indentations between the elements, paddlings inside the container – and then the frame works as a living unit, not as a picture.

I changed the text in the button – it became wider. Added the card to the list, the neighbors moved. Stretched the frame - the content was redistributed according to the rules, not gone.

It’s basically the same model as CSS Flexbox on the web. And this is no coincidence: Auto Layout is specifically made so that the design file behaves like what the developer will then assemble. The closer your layout is to the actual behavior of the interface, the fewer discrepancies at the junction.

Three things that change at once

After you translate the working layouts to Auto Layout, the changes are felt literally on the first day:

  • Editing takes seconds, not minutes. Longer text - frame adjusted. Added a block - the neighbors dispersed.
  • **Adaptive is no longer a separate project. ** One component with the correct stretching rules works on both 1440 and 375.
  • Design system becomes possible. Without Auto Layout, components break down from any content change. They live with him.

The main anti-patterns, which you can see before Auto Layout

You can see these signs in a minute. If you find at least three, it’s time to fix the process, not a separate layout.

  • Buttons with different widths that have the same length of text
  • Cards in one grid differ in height by 2-4 pixels
  • When changing the language (for example, to German), the layout crumbles
  • To add an item to the menu, you copy the old one and move everything else with your hands
  • The mobile version is not the same thing, but a separate file that lives its own life
  • In the layout is perfect, in the sale - paddings "for some reason" others

Quick check: how dependent you are on manual layout

Open your current screen and try:

  • Double the length of the headline. The model survived?
  • Add two items to the list. Did you have to move your hands?
  • Stretching the frame 200 pixels wide. Has the content been redistributed or moved?
  • Replace the icon with a slightly larger one. Neighbors set up?

If the answer is no to at least one item, the screen will cost you time for every edit. And there will be many edits.

How to translate an existing layout to Auto Layout

The main mistake in the transition is to try to wrap the entire screen in one big Auto Layout frame and hope it gets better. It won't. You need to start from the bottom, from the smallest blocks, and collect up.

Step 1: Atoms

Find the smallest repeatable elements – button, input, chip, icon with a signature, line of list. Wrap everyone in Auto Layout. Set paddings inside (not indentations around the text), direction, gap between the icon and the label. At this level, the Hug is almost always needed in width and height – the element must adapt to the content, not vice versa.

Step 2: Molecules and blocks

Then you collect cards, sections, tulbars. Here comes the choice of what is inside (Fill) and what remains fixed. Typical card: Fixed avatar, Fill text block, Hug action button. If at this stage, the component already responds correctly to long text, move higher.

Step 3: The whole screen

The external frame of the screen sets the direction (usually vertical), scroll zones, fixed header and footer. Content: Fill in width, Hug in height. After that, pass the “stretch-squeeze” test: pull the width of the frame in both directions and see where something is going.

Typical errors in implementation

Auto Layout "for the tick"

The frame is wrapped in Auto Layout, but inside is still elements with absolute coordinates or text in a fixed frame. It looks right, in fact nothing works. The sign is that when changing content, you still have to move your hands.

Too much nesting

Five to seven levels of Auto Layout within a single card. To correct the indentation becomes a quest: you look for the level at which he lives. If you catch yourself on this, take the insides into a separate component and simplify the hierarchy.

Confusion Hug / Fill / Fixed

The most common source is "why it doesn't stretch." The short rule:

  • Hug is the content size. Buttons, chips, signature icons.
  • **Fill, take all available space. Input fields in the form, the main content next to the sidebar.
  • Fixed is a fixed value. Avatars, icons, sidebar width.

If the button does not grow under long text, it is most likely Fixed. If the input field does not stretch to the full width, Hug instead of Fill.

Forgotten min/max

The button with Hug in short text collapses to indecently narrow. Fill card with a wide screen becomes unreadable. Min width on the button and max width on the text block solve this in one action – but they are consistently forgotten.

Scenarios that show profits

Variable content card

A tape of cards, where one has a short title, the other has four lines. Without Auto Layout, there are six separate layouts. It's one component that grows in height, and the neighbors in the grid adjust.

Dynamic field form

Fields appear and disappear depending on the user’s choice. On fixed frames, you hold several states and move everything under them. With Auto Layout, you just hide the layer, the rest comes together.

Adaptation without copy of file

Desktop and mobile are assembled on the same components with the correct Fill/Hug. You change the width of the parent frame from 1440 to 375, and the grid of three columns turns into one – without a separate “mobile layout”, which then moves with the desktop.

Questions for review layout

Before you give the layout to the development or review, run it through the list:

  • If you double any text, will the layout survive?
  • If you substitute real data from the API (with long names, empty fields, missing avatars) – what will break?
  • Are all paddlings given through Auto Layout, rather than by eye indentation between layers?
  • Do buttons of the same type have the same height in all states?
  • Is there a min/max where content can change?
  • Is it possible to change one token of indentation and update the entire system – or do you have to rule by hand?

If someone moves the block and the entire screen crumbles, it’s not “he broke,” it’s the layout that was fragile.

Segment summary

Auto Layout is neither magic nor perfectionist. It’s a way of transferring some of the interface logic right into the layout so that it stops being a picture and becomes a behavior model. Introduced from the bottom up, checked by stretching and real data, breaks on the confusion of Hug/Fill/Fixed - and pays off with the first round of edits.

Advanced scenarios: where Auto Layout ceases to be “convenience”

Up until that point, everything that we were disassembling was related to one layout: card, shape, screen. At this level, Auto Layout saves hours. But the real payoff comes when the layout ceases to be a personal file and becomes part of the system – with components, options, localizations, virgin mode and AI that generates markup on top of your frames.

Component and condition options

A button with five states (default, hover, active, disabled, loading) and three sizes are 15 options. Without Auto Layout, each of them lives its own life: the padding is slightly different, the icon is shifted by a pixel, in the loading state the text somehow jumps.

With Auto Layout, the rule is different: padding, gap and min-height are set at the base component level, states change only the color, shadow and content of slots. If then the design system decides to make the 2px button more compact, it is one token, not 15 manual edits.

Slots and composition

When the card should be able to take in arbitrary content (icon, preview, another card), Auto Layout gives an honest mechanism of slots: an empty Fill frame with a fixed indentation logic, into which, through an instance swap or simply replacing the content, anything is substituted. The card itself adjusts to the height of the nested.

The anti-pattern is to make a “universal” card of 12 hidden layers that are turned on by ticks. After a month, no one remembers what is included, and it is easier to assemble a new one.

Localization and Long Languages

German is longer than Russian, Arabic goes from right to left, there are no gaps in Japanese and transfers behave differently. If the layout is assembled on fixed widths, the localization turns into a separate project.

The check is simple: take the longest translation (or just run the text through the “extension” by 40%) and substitute all key screens. It should be stretched, transferred, turned around - without manual edits. For RTL, add the Auto Layout direction mirror and see if the icons have moved away.

AI generation and MCP: where Auto Layout is critical

More and more teams are now connecting Figma to LLM agents via MCP or generating interfaces from the layout directly into the code. And here you can see very clearly: the model reads the frame structure, not the picture.

A frame without Auto Layout for an agent is a set of layers with coordinates. It will generate markup, but without understanding what should be stretched and what should stay on the content. The output is a static JSX, in which everything is nailed.

The frame with the correct Auto Layout reads like a ready-made hierarchy of flex containers: direction, gap, padding, Fill/Hug turn into flex, gap, padding, flex: 1 and width: fit-content almost one to one. The generated code is immediately adaptive.

The practical conclusion: if you implement AI generation or dev mode seriously, the Auto Layout audit is not cosmetics, but a condition that the result is usable.

Risks worth remembering

  • The agent will confidently generate a “plausible” markup even on a curved layout – you will have to check with your eyes, not with confidence in the conclusion.
  • The hidden layers inside the Auto Layout enter the generation as a conditional render. If there are dozens of them, the code becomes unreadable.
  • The model uses the names of frames as clues. Frame 247 and CardHeader / Title provide radically different code quality.

How to explain the decision to the team

The introduction of Auto Layout always rests not in Figma, but in people: the product does not understand why to spend a sprint on “remarking”, the developer is skeptical, the second designer is used to his way.

Arguments that work

  • ** For the product**: less time for editing content and copyright - no need to wait for the designer to change the title.
  • ** For the developer**: the layout becomes close to the flex markup, less questions about how it should behave at X.
  • For a design lead: One source of truth for indentations and sizes, changes through tokens, not manual file traversing.
  • ** For yourself: less boring work on pixel alignment, more time on the actual design.

What not to promise

That everything will get faster "at once." The first weeks will be slower: relearning, remarking old files, disputes on the review. Profit is visible on the horizon of the project, not one screen.

Auto Layout maturity checklist in the team

  • All the basic components of the design system are assembled on Auto Layout, without exception.
  • The margins and dimensions are given by variables/tokens, not numbers in properties.
  • The review has an explicit clause "checked stretch and long text.".
  • The new designer gets a short Hug/Fill/Fixed guide for the first week.
  • Dev mode or MCP integration gives the developer meaningful values of flex/gap/padding.
  • Localization and dark theme do not require separate copies of layouts.

If half the points are "no" - the team has Auto Layout as a feature, but does not have it as a practice.

Segment summary

Auto Layout is scalable from one button to the entire design system and up to a Pipeline with AI code generation. At the team level, its value is not in beautiful layouts, but in the fact that the layout becomes predictable: for localization, for the maiden regime, for the agent, for the new person in the project. Anything that makes an interface a system, not a picture, only works if there is honest markup underneath.

The anti-patterns you see on any review

Auto Layout is easily assembled incorrectly so that everything looks clean on the outside, and inside - a time bomb. Most problems are repeated from project to project, so it makes sense to keep the list in front of you.

Fixed width where Fill should be

The most common mistake after the first week with Auto Layout. The designer puts the card width 320 and goes on. On the model 1440 everything is OK, on the 1280 - cut off, on the 1600 - the white hole on the right. The rule is simple: if a container lives inside a grid or parent, it is almost always a Fill, not a fixed number.

Seven levels of nesting for one indentation

When there is a frame inside the card, there is a frame inside it, there is another frame inside it, and so on before the text, this is a sign that the person added Auto Layout as a wrapper every time something “did not stand up.” Check: Is it possible to remove the intermediate container without losing visual meaning? If so, he's superfluous.

Spacer frames instead of gaps

The empty rectangles, 16 in height between the blocks, are a legacy of pre-Auto Layout. Now it's just noise: breaks the alignment when changing the gap through the variable, confuses agents and dev-mode, interferes with the review.

Absolute position as a crutch

Inside the Auto Layout, you can turn on Absolute position. Sometimes it's legal - a badge in the corner of an avatar, for example. But if there are a dozen absolute elements in the layout, most likely, the markup is assembled in the wrong place, and the person simply “nailed” what did not stand up on the flex.

Padding with hands instead of tokens

When one card has a padding 16, the next card has 14, the third card has 18, it is not a design nuance, it is the absence of a system. On a real product, such indentations creep for a quarter into an incompatible zoo.

One big Auto Layout instead of a hierarchy

The screen, assembled by one vertical frame, in which the header, filters, table and footer go in a row, formally works. But any nonlinear task (fix the header, make a sidebar) requires remarking from scratch. It is better to lay the hierarchy right away, even if it seems that “not yet necessary.”.

Questions for review layout

A list that you can run through before giving the layout to the development or library.

  • What happens to the screen if the text in the headlines grows one and a half to two times?
  • What frames are on Fixed and is there a clear justification for each?
  • Do the indentations and sizes match the design system tokens, or are they hand-marked somewhere?
  • Frame names read like a component hierarchy, or Frame 128?
  • How many nesting levels? Can it be reduced without losing meaning?
  • What will happen to the markup at the minimum and maximum width of the breakpoints?
  • If you switch to a long language (German, Finnish), where will it break first?
  • How many absolute layers are there and why are they absolute?
  • If a developer opens dev mode, will they get meaningful flex/gap/padding or junk?

These questions are not to blame the layout on the review. They are so that the author himself went through them before the review and closed the obvious.

Checklist before sending the layout to the development

  • There are no fixed widths for containers that need to stretch.
  • No spacer frames - all indentations through gap and padding.
  • All indentations and sizes are taken from variables, not driven by a number.
  • Auto Layout's nesting is no deeper than justified by the hierarchy.
  • All key states (long text, empty state, error, download) are checked right in the layout.
  • The names of frames and components are meaningful.
  • The layout is tested on at least two breakpoints.
  • Localization and RTL do not break the markup.

Practical outcome

Auto Layout ceases to be a feature of Figma at the moment when the team agrees on its rules: what is Fill, what is Fixed, where the indentations live, what frames are called, which is considered a sign of poor markup. Before this agreement, each designer builds his own small world, and the clock is spent not on design, but on aligning other layers and explaining to the developer what should stretch.

After that, the layout begins to work like code: it responds predictably to content, experiences localization, is read by agents and people in the same way. And then the phrase “should take minutes” becomes not a slogan, but a normal background of work.

$ cd ../ ← back to Figma and layouts