Troubleshoot Nested Auto Layout in Figma: Padding, Spacing and Size

Author: Pablo Mayoral Published: 27/11/2026 Updated: 27/11/2026
Category: Figma →

To troubleshoot nested Auto Layout in Figma, measure the exact edges that should move when you change padding or spacing. Select the immediate parent of the layers on either side of the gap.

Troubleshoot Nested Auto Layout in Figma: Padding, Spacing and Size
Quick Answer

To troubleshoot nested Auto Layout in Figma, measure the exact edges that should move when you change padding or spacing. Select the immediate parent of the layers on either side of the gap.

To troubleshoot nested Auto Layout in Figma, measure the exact edges that should move when you change padding or spacing. Select the immediate parent of the layers on either side of the gap. Check its flow and whether the gap is numeric or Auto, then check whether the child participates in the flow. If the space stays constant but the frame stops resizing, inspect the width or height settings on that axis. Make one change on a copy and measure again.

The exercise uses a fictional accordion for Northbank, a workshop booking service. The accordion contains a trigger labeled “What should I bring?” and a panel with a packing list. The outer gap leaves the title and chevron unchanged, the space between those two layers grows when the trigger is widened, and an item marked “Required” covers a longer label. Each symptom calls for a different test. The dimensions below are proposed test values in a Figma design, so substitute your actual values when tracing a production component.

Find the frame that owns the gap

On a copy of the affected component, expand its layer tree. Northbank has a vertical accordion item, a horizontal trigger and a vertical answer panel. The trigger contains the text and chevron. The answer panel contains the packing-list heading and its rows. Select the label and chevron in the Layers panel and identify the first frame that contains both as direct children. That frame is the trigger. Figma’s layer selection guide covers selecting nested objects on the canvas and moving up to the parent from a child.

The accordion item owns the gap between the trigger and answer panel. The trigger owns spacing between its label and chevron.
The accordion item owns the gap between the trigger and answer panel. The trigger owns spacing between its label and chevron.

The item’s vertical gap controls the distance between its trigger and answer panel. The trigger’s horizontal gap controls the distance between its own label and chevron when the row uses a numeric gap and the label has its own natural width. Raising the item gap from 12 to 20 changes the first distance in the expanded state. In the collapsed state there is only one item in that flow, so there is no second child for the gap to separate. Compare the same two edges in the expanded state before and after the edit.

Try a deliberately visible temporary value, such as 40, on one selected frame. If the answer panel moves while the trigger’s contents hold their positions relative to each other, you have identified what the setting owns. Undo the temporary value and write down the layer name alongside the measurement. If the end result must pin the chevron to the right, record the distance to the right edge as well. That distance answers a different question from the one between label and icon.

Separate padding from spacing

A padding value belongs to the space between a frame’s boundary and its children. A gap applies between children in that frame. On Northbank’s expanded item, measure from the panel border to the packing-list heading to check padding. Measure from the bottom of the heading layer to the top of the first list row to check gap. Figma describes the two properties separately in its guide to horizontal and vertical flows.

Figma Auto Layout sidebar crop showing direction, dimensions, gap and individual padding fields.
The gap and padding controls occupy different rows in this Figma sidebar crop from the EmviUI library.
Measure to the panel border, then to the heading. The outer gap and top padding add up to 28 pixels in the test.
Measure to the panel border, then to the heading. The outer gap and top padding add up to 28 pixels in the test.

Keep the answer panel’s top padding at 16 and its vertical gap at 8 in the proposed example. Trace the space below the trigger to the heading. The route crosses the outer item’s 12-pixel gap, then the panel’s 16-pixel top padding. The heading begins 28 pixels below the trigger’s bottom when those edges coincide with the relevant layer bounds. A border, a glyph’s internal whitespace or an additional wrapper can affect what the eye perceives. Measure the layer bounds first and treat any remaining visual difference as a second observation.

If a reviewer asks for more room above the heading, ask them to point to the region that should expand. Adjusting the item gap also moves the panel’s border. Adjusting the panel padding moves the heading inside that border. If the intent is more room between list entries, select the list frame instead. These changes can all make the screenshot feel less crowded, but they produce different results when the accordion is closed or a second section is added.

Test numeric gap and Auto

Isolate the distribution rule before editing it. Make a horizontal test frame with a fixed width of 320, padding of 16 on both sides, a label layer 112 wide and a chevron layer 16 wide. Align the pair to the left when the gap is numeric. With a numeric gap of 12, those two layers leave 148 pixels unused inside the row. When gap is Auto with the Between distribution, the same layers use the available 160 pixels between them. The 16-pixel padding at each edge is still applied.

A numeric gap stays at 12 pixels. Auto with Between uses 160 pixels between the two child layers at the example width.
A numeric gap stays at 12 pixels. Auto with Between uses 160 pixels between the two child layers at the example width.

Now widen the test frame to 360 while keeping both child widths. The Auto Between gap should increase to 200. If you enter the 12-pixel numeric gap again, the children come back together and the left-aligned frame has more spare room to the right. Figma’s spacing documentation also describes Evenly and Around. Check the distribution setting before expecting the Between calculation. If there are multiple child layers, more than one gap can share the space.

Use the result to choose behavior for the actual trigger. For a chevron that travels with its title, choose a fixed gap and measure the icon from the title layer. For a chevron that stays near the trailing edge, try Auto Between when the label uses its natural width. If a text wrapper fills the row, the visible characters can stop long before the wrapper ends. In that case, the gap next to the icon is measured from the wrapper edge. When a long title nearly fills the trigger, confirm that it can wrap and the chevron remains visible. Under Auto, Figma documents that the gap reaches zero when there is too little space for positive separation.

Check whether the layer is in flow

If changing the gap can move one sibling but passes another by, select the stationary layer and check Ignore auto layout. In Figma’s Auto Layout guide, an ignored child stays inside its parent in the layer tree and is excluded from that parent’s layout flow. It can still respond to constraints when the frame resizes. A badge can therefore look like part of a row while the other layers reserve no space for it.

An ignored badge has no reserved space in the row. When it participates in the flow, the row can give the label space to wrap.
An ignored badge has no reserved space in the row. When it participates in the flow, the row can give the label space to wrap.

In Northbank’s list, the “Required” badge belongs in the row with “Waterproof gloves.” On the test copy, put the badge in the horizontal flow and add a short numeric gap. Give the text room to wrap where the product needs two lines. Try “Waterproof gloves for the equipment demonstration” and check that all words and the badge remain readable. Preserve the badge wording when changing its position. If the two become too wide, test a deliberate arrangement with the badge below the label.

An overlay may be intentional. A little marker on the corner of a thumbnail can be anchored there if its possible overlap is part of the design. Document that decision and check it with the longest nearby label. If the selected badge is already in flow, use the layer tree to check whether the badge sits in a different nested frame from the text. Recheck the immediate parent of each object. This can prevent a patch that moves both elements on one screen and reintroduces the collision in another variant.

Trace the dimension that stopped changing

When a panel’s height stays the same as the answer grows, select the answer text, the answer panel and then the outer item. Record the height setting for each, separately from width. Figma’s resizing reference explains that Fixed preserves a dimension, Hug measures the contents and Fill uses space offered by an Auto Layout parent. A child set to Fill on an axis can cause a previously Hug parent to become Fixed on that axis. Document any min or max constraints while the layer is selected.

Follow the height from answer text to panel to accordion item and record the first frame that stops growing.
Follow the height from answer text to panel to accordion item and record the first frame that stops growing.

Reproduce the problem with the same width, at first. Replace a short answer with one that wraps to three lines. If the text bounds gain height but the answer panel does not, check whether you are looking at a fixed-height panel. For Northbank, the design calls for growing answers, so try Hug height on the panel and make sure no child is asking to Fill the panel’s height. Keep the agreed width behavior. The height diagnosis will be easier to repeat when it does not depend on two simultaneous changes.

If the next sibling stays still even though the panel has grown, continue one level up. The outer item could still have a fixed height or the next item could belong to another layout. If setting a minimum or maximum was deliberate, note the boundary and the expected behavior at that size, including where overflow is handled. If you are defining a new responsive sizing arrangement, the EmviUI guide to Fill Container has examples for toolbars and flexible text. Here the evidence to keep is the first frame whose measured height diverges from its expected response.

Check the fix on a real component

The EmviUI accordion preview shows closed triggers and open panels, so there is a useful edge to inspect in each state. In the open example, distinguish the outer distance between items from the distance between the answer copy and its panel boundary. The screenshot provides a visual reference. Use an editable instance to inspect actual layer ownership, padding values and behavior with another language.

EmviUI accordion variants with alternating collapsed and expanded states, chevrons and visible answer copy.
EmviUI accordion specimens. Compare the whitespace outside the item with the whitespace between the answer text and its panel.

EmviUI’s Lists component documentation describes compact rows with optional trailing elements and single- or dual-line content. Use those differences to make your test realistic. Compare an item with just a label to an item with supporting text and a trailing badge. On Northbank, use the first as a control and the second to surface a failure. Record the instance variant and whether the problematic value belongs to a local instance or the shared component. Figma’s guide documents that instances can override certain gaps and padding, while structural edits such as reordering layers belong in the main component.

Recheck the edit in the expanded and collapsed states, then substitute longer copy. Ask a teammate to follow the same steps on a fresh instance. If the fix depends on a spacing variable, the guide to Figma spacing variables explains how to verify that the intended field is still bound. Record the before and after values alongside the matching layer paths. That gives the next designer a concrete case to run whenever someone adds another row, changes a variant or updates the library.

Keep three small screenshots when handing off the repair. Capture the selected frame with the relevant field visible, the measured gap at the original width, and the same edge after the long-copy test. Label the screenshots with the state and width so the team can compare like with like. Copy the expected behavior into the component notes in plain terms such as “The answer panel gains height when the answer wraps.” This is specific enough to test again and avoids relying on the memory of how the old screenshot looked.

Northbank repair checks
SymptomMeasurement to keep
Panel moves when the outer gap changesTrigger bottom to panel top
Icon moves as the row gets widerLabel edge to icon edge at 320 and 360
Long answer does not move the next itemText, panel and outer item heights at the same width
Pablo Mayoral

Senior UX/UI & Web Designer with 10+ years of experience. Creator of EmviUI (10k+ components Figma design system), UImand, and Vitamin Bootstrap. Currently designing digital products at CQMRewards.

Frequently asked questions

Why does the outer gap leave the icon next to the label? ▼
The outer frame spaces its direct children. Select the trigger containing the label and icon to check their gap.
Why does the gap grow when I widen the trigger? ▼
With Auto and Between, available space is distributed between children. Enter a numeric gap to hold that interval constant.
Can Auto spacing make layers overlap? ▼
Figma documents a zero lower limit for Auto gap when positive separation will not fit. Check the child dimensions and any ignored layers if you still see a collision.
Why does my badge stay still when other layers move? ▼
Check Ignore auto layout on the badge and confirm its immediate parent. An ignored child is excluded from that parent’s layout flow.
Why did my Hug panel switch to Fixed? ▼
Figma documents that a child set to Fill container makes its parent Fixed on that axis if the parent was set to Hug. Check width and height independently.
Can I repair spacing on an instance? ▼
Figma documents instance adjustments for padding and gap. Make shared structural repairs, such as reordering children, in the main component.

Related articles