F Figma

How to master auto layout on Figma

intermediate 12 min read Updated 2026-03-18
Quick Answer

Auto layout in Figma allows you to create responsive designs that automatically adjust spacing and sizing. Master it by understanding direction settings, padding/spacing controls, and alignment options to build dynamic components and layouts.

Prerequisites

  • Basic Figma interface knowledge
  • Understanding of frames and components
  • Familiarity with design principles
  • Experience with responsive design concepts

Step-by-Step Instructions

1

Enable Auto Layout on a Frame

Select any frame or group of objects in your design. In the Design Panel on the right, click the Auto Layout button (plus icon) or use the keyboard shortcut Shift + A. Your frame will now have auto layout properties and display directional arrows indicating the layout flow.
You can also right-click on a selection and choose 'Add Auto Layout' from the context menu.
2

Configure Layout Direction and Alignment

In the Auto Layout section, choose your layout direction using the arrow icons:
  • Horizontal: Items flow left to right
  • Vertical: Items flow top to bottom
Set alignment using the Alignment controls below. Use Packed for tight spacing or Space between for distributed spacing.
Use 'Wrap' option for responsive layouts that break to new lines when content exceeds container width.
3

Set Padding and Item Spacing

Configure Padding (space inside the container) by clicking the padding icon and entering values for top, right, bottom, and left. Set Item Spacing using the gap control to define space between child elements. You can use fixed values in pixels or relative units.
Hold Alt while adjusting padding to set all sides simultaneously, or click the link icon to maintain equal padding.
4

Control Resizing Behavior

Select individual items within your auto layout frame. In the Resizing section, choose:
  • Fixed: Maintains exact dimensions
  • Fill container: Stretches to fill available space
  • Hug contents: Adjusts size based on content
This determines how elements respond when the container changes size.
Use 'Fill container' for backgrounds and 'Hug contents' for text labels to create truly responsive components.
5

Create Responsive Components

Convert your auto layout frame to a component using Ctrl/Cmd + Alt + K. Create instances and test responsiveness by adding or removing content. Use Component Properties to expose text content, boolean visibility, and variant switching for maximum flexibility.
Name your main component with a clear structure like 'Button/Primary/Large' to organize your design system effectively.
6

Nest Auto Layouts for Complex Designs

Create sophisticated layouts by nesting auto layout frames within each other. For example, create a vertical auto layout for a card, then add horizontal auto layouts for header sections. Each nested auto layout maintains its own spacing and alignment properties.
Keep nesting levels manageable (2-3 deep max) to maintain performance and avoid layout conflicts.
7

Use Auto Layout with Constraints

Combine auto layout with Constraints for advanced responsive behavior. Select your auto layout frame and set constraints in the Design Panel. Use Left & Right constraints to make containers stretch with their parent, while maintaining auto layout spacing internally.
Auto layout works best for content-driven sizing, while constraints handle positioning relative to parent containers.

Common Issues & Troubleshooting

Elements overlap or don't space correctly

Check that all child elements have appropriate resizing settings. Ensure items aren't set to 'Fixed' width when they should 'Hug contents' or 'Fill container'. Verify Item Spacing values are positive numbers.

Auto layout breaks when adding new content

Review the resizing behavior of existing elements. Set text layers to 'Hug contents' and background elements to 'Fill container'. Ensure the parent auto layout frame has enough space or is set to grow with content.

Nested auto layouts conflict with each other

Simplify your layout hierarchy and ensure each nested auto layout has a clear purpose. Check that parent and child alignment settings don't contradict each other. Consider using absolute positioning for elements that don't need to follow the auto layout flow.

Components don't maintain responsive behavior when used

Verify that your main component uses auto layout throughout its structure. Check that component properties are properly configured and that instance overrides aren't breaking the auto layout behavior. Test components in isolation before using in larger layouts.

Prices mentioned in this guide are pulled from current plan data and may change. Always verify on the official Figma website before purchasing.