Skip to content

Figma Auto Layout Not Working Fix

DodaTech Updated 2026-06-24 2 min read

In this tutorial, you'll learn about Figma Auto Layout Not Working Fix. We cover key concepts, practical examples, and best practices.

The Problem

You add auto layout to a frame but elements overlap, refuse to stack, or padding/spacing values don't apply. Auto layout properties are ignored because the frame or its children lack the correct constraints.

Quick Fix

Step 1: Verify auto layout is enabled

Select the frame and check the Design panel. Auto layout must be toggled on.

Wrong — no auto layout:

Frame selected → Design panel shows only constraints

Right — auto layout enabled:

Frame selected → Auto layout ON
Padding: 16px
Spacing: 8px
Direction: Horizontal

Expected output: Children arrange in a row with 8px gaps and 16px padding.

Step 2: Set direction and wrapping

Switch direction or use wrap for responsive layouts.

Wrong — items overflow horizontally:

Direction: Horizontal
Wrap: No wrap

Right:

Direction: Vertical
Wrap: Wrap

Expected output: Items stack vertically or wrap to the next row.

Step 3: Fix nested auto layout

Nested frames need their own auto layout.

Wrong — inner frame has fixed dimensions:

Inner frame: width 300px, height fixed, no auto layout

Right — inner frame also uses auto layout:

Inner frame: Auto layout ON
Padding: 12px, Spacing: 4px

Expected output: Inner content resizes with the parent frame.

Step 4: Use hug contents for dynamic sizing

Let frames resize to fit content.

Wrong — fixed width button:

Button frame: width 120px, height 40px

Right — hug contents:

Button frame: Width → Hug contents
Height → Hug contents
Padding: 16px 24px

Expected output: Button resizes to fit text, similar to Doda Browser's responsive toolbar icons.

Prevention

  • Always enable auto layout on the parent frame, not the children
  • Use 'Hug contents' for dynamic elements like buttons and badges
  • Avoid mixing auto layout with manual absolute positioning in the same frame
  • Test responsiveness by resizing the frame in the canvas preview

Common Mistakes with auto layout

  1. Forgetting deriving (Show, Eq) on custom data types needed for debugging
  2. Placing the wildcard pattern first in case expressions, making all subsequent patterns unreachable
  3. Using head and tail instead of pattern matching, causing runtime errors on empty lists

These mistakes appear frequently in real-world FIGMA code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

### Why do my items overlap in auto layout?

Overlap happens when a child has a fixed width larger than the parent's available space. Set children to 'Fill container' or reduce their fixed sizes.

Can I nest auto layout frames?

Yes, nesting auto layout frames is the recommended pattern. Each nested frame has its own padding, spacing, and direction settings.

Why is my spacing not showing?

Spacing only applies between direct children. If a single child fills the entire frame, spacing has no visible effect. Add more children or reduce the fill setting.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro