Mastering Adobe XD Auto Layout: Build Responsive Components in Minutes
Learn how to use Adobe XD's Auto Layout to build responsive UI components that adapt to content and screen size. Follow a step‑by‑step guide, verify with resizing tests, and recover layout changes if needed.
02 Jul 2025, 10:56 UTC

Desired Outcome
Use Adobe XD’s Auto Layout to create a UI component that automatically resizes and re‑spreads its children when content changes or the artboard width/height is altered. The component should stay consistent across desktop, tablet, and mobile artboards.
Prerequisites
- Adobe XD CC 2022 or newer installed.
- Basic knowledge of artboards, groups, and components.
- Access to an XD file with at least one artboard.
- Optional: a local backup or cloud history enabled for recovery.
Procedure
- Prepare the content. Create the elements that will live inside the component. For example, a rectangle for the button background, a text label, and an icon group. Group them together (Ctrl+G or Cmd+G).
- Convert the group to a component. Select the group, right‑click, and choose Make Component (or press Ctrl+K/Cmd+K). Give it a name like
Button‑Primary. - Enable Auto Layout. With the component selected, click the Auto Layout button in the right‑hand panel. Set the Direction to Horizontal if the button is left‑to‑right, or Vertical otherwise.
- Configure spacing. In the Auto Layout panel add Spacing between items (e.g.,
8 px) and Padding around the edges (e.g.,12 pxon all sides). Use the Stretch toggle on the background rectangle to make it fill the layout width. - Set sizing options. For the text label, choose Fit Content so it expands with the text. For the icon, set a fixed width/height or Fit Content if you want it to scale with the icon asset.
- Test the layout. Drag the component onto a larger artboard. Notice the background rectangle expands, the spacing between text and icon stays at 8 px, and the padding remains 12 px. Resize the artboard smaller; the component shrinks proportionally.
- Propagate to nested components. If the button contains another component (e.g., an icon component), the Auto Layout settings of the parent will automatically apply to the child unless the child has its own Auto Layout. Verify by opening the icon component and checking its layout panel.
Expected Checks
- Open the component’s Properties panel and confirm the
Direction,Spacing, andPaddingvalues match the design specification. - Resize the artboard to at least three different widths (e.g., 1440 px, 768 px, 375 px) and observe that the component’s width and internal spacing adjust correctly.
- Export the artboard to PNG at 1×, 2×, and 3× scales and verify that the visual proportions remain intact.
- Check the Hierarchy panel to ensure that nested components are not unintentionally receiving Auto Layout from the parent.
Recovery Options
- Reset Auto Layout settings. Select the component, click the Reset button in the Auto Layout panel. This removes all layout properties but keeps the component structure.
- Remove Auto Layout from a group. With the group selected, click the Disable Auto Layout icon (it looks like a small square with a minus sign). The group will revert to a normal group without layout behavior.
- Restore from backup. If the layout changes caused a design break, open the History panel (Ctrl+Alt+H/Cmd+Option+H) and revert to a previous version of the file.
- Performance mitigation. For large artboards, consider flattening or grouping Auto Layout sections that do not need dynamic resizing, or use master components to reduce the number of nested Auto Layouts.
Practical Tip
When designing for multiple screen sizes, create a master component with Auto Layout and then use Overrides to change text or icon assets for specific instances. This keeps the layout logic in one place and reduces the risk of accidental changes in child components.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.