Skip to content

Arrange items with Auto Layout

Auto Layout keeps the items inside a frame arranged as a row or column. It is useful for buttons, lists, navigation bars, cards, and repeating groups.

Enable Auto LayoutSelect a frame and switch its layout flow from freeform to horizontal.Result: The frame uses a horizontal Auto Layout, hugs its contents at 296 by 120 pixels, and places both children with 16-pixel padding and a 40-pixel gap.

Transcript

  1. Select the frameSelect the frame in the Layers panel.
  2. Enable Auto LayoutChoose Horizontal stack to enable Auto Layout and arrange the children.
Download the tutorial videoDownload English captions
  1. Select a frame that contains two or more objects. You can select it on the canvas or in Layers.
  2. In the right panel, find Layout.
  3. Choose the Horizontal stack icon for a row or the Vertical stack icon for a column.
  4. Adjust Gap to change the space between items.
  5. Adjust Padding to change the space between the items and the frame edge.

The items move immediately, while the frame remains selected. Both axes start as Hug, so the frame can shrink or grow to fit its contents as soon as you turn on Auto Layout.

If you need to keep the frame’s original bounds, use Undo to restore the original size and note its width and height. Turn on Auto Layout again, set Main axis resizing and Cross axis resizing to Fixed, then restore the original width and height.

Select two or more objects that share the same parent—the same page level, frame, or group—and press Shift + A. Editor v2 creates a frame around them, suggests a direction and spacing from their current positions, and turns on Auto Layout.

If the shortcut or Add Auto Layout action is unavailable, check Layers and move the objects under the same parent before trying again.

  • Fixed keeps the width or height from the moment you choose it.
  • Hug grows or shrinks the frame to fit its contents.
  • Fill lets an item use the available space inside its Auto Layout parent.

Use fixed sizing when you need an exact container size, and hug sizing for controls that should adapt to their content.

Select the Auto Layout frame and choose the four-dot Freeform (no layout) icon in Layout. You can also right-click the frame and choose Remove Auto Layout, or press Ctrl/ + Shift + A. The objects keep their current positions but return to freeform placement.