This Adobe XD tutorial covers how to create and adjust stacks, rearrange and add items to a stack, use responsive resize, work with padding, nest stacks, and even turn an entire page into a stack. It provides step-by-step instructions and images to guide you through each process, ensuring you acquire essential Adobe XD skills.
This exercise is excerpted from Noble Desktop’s past web design training materials and is compatible with Adobe XD updates through 2020. We now teach Figma as the primary tool for web and UX & UI design. To learn current skills in web design, check out our Figma Bootcamp and graphic design classes in NYC and live online.
Note: These materials are provided to give prospective students a sense of how we structure our class exercises and supplementary materials. During the course, you will get access to the accompanying class files, live instructor demonstrations, and hands-on instruction.
Topics covered in this Adobe XD tutorial:
Creating a Stack & Adjusting the Spacing, Rearranging & Adding Items to a Stack, Responsive Resize, Stacks, & Padding, Keystrokes for Working with Stacks & Padding, Nesting Stacks (Stacks Within Stacks)
Exercise Preview
Exercise Overview
In this exercise, you’ll explore how to stack, reorder, resize, and adjust the space around or between design elements.
Creating a Stack & Adjusting the Spacing
- In Adobe XD, go to File > Open from Your Computer or hit Cmd–Shift–O (Mac) or Ctrl–Shift–O (Windows).
- Navigate into Desktop > Class Files > Adobe XD Class and double–click on Hawaii.xd to open it.
- Zoom in on the top of the artboard so you can see the text in the navbar.
- In the Toolbar, choose the Select tool .
- Let’s even out the spacing between the text links in the navbar. In the navbar, click on Maui.
- Hold Shift and click on the other 3 items (Oahu, Kauai, and Big Island).
- Group them by hitting Cmd–G (Mac) or Ctrl–G (Windows).
-
In the Property Inspector on the right, click on the checkbox under Stack.
NOTE: The spacing amount to the right starts out as a dash (—) because the amounts are different.
- Hover over the space between Maui and Oahu and you won’t see anything happen.
- Hold the tilde (
~
) key that’s at the top left of most keyboards below the Esc key. - While holding the tilde
~
key, again hover over the space between Maui and Oahu and this time you should see a pink highlight for the space between the items! - Continue holding the tilde
~
key, and drag left and right to resize the space. - This only adjusted the space between those 2 items. Let’s make all the spaces the same. Hold tilde
~
and Shift and hover over any of the gaps between the items and they should all highlight pink. - Continue holding the tilde
~
and Shift and drag left and right to resize all the spaces (making them consistent). - Let’s see another way to do this without the tilde key. Double–click on Maui to go into the group.
- Hover over the space between Maui and Oahu and you should see a pink highlight.
- Hold Shift and the pink highlight should appear on all the spaces. Drag left and right to resize them.
- Let’s finish this by setting a specific amount of space. Hit Esc to reselect the group (you should see an the blue outline around the group of text links).
In the Property Inspector on the right, under Stack there’s an amount to the right of the checkbox. Change that to 30.
Rearranging & Adding Items to a Stack
- In the navbar, double–click on Kauai to select it.
-
Drag it to the left (while holding Shift) so it’s between Maui and Oahu.
XD is smart enough to keep the same spacing!
- In the navbar, click on Big Island to select it. (If the group gets selected, double–click to go into the group and only select Big Island.)
- Hit Cmd–C (Mac) or Ctrl–C (Windows) to copy it.
- Hit Cmd–V (Mac) or Ctrl–V (Windows) to paste it.
- Let’s make one more copy, but a different way. Select Oahu.
- Hold Option (Mac) or Alt (Windows) and drag a copy between the 2 Big Island pieces of text.
- Hit Esc to reselect the entire group.
- Hold Shift (so it doesn’t move vertically) and drag the entire navbar to the left so you can see all the items.
- Change the last 2 items to Quick Facts and Travel Info by double–clicking on the text until it becomes editable.
- The nav should now be: Maui, Kauai, Oahu, Big Island, Quick Facts, Travel Info.
- Click in an empty area of the canvas to deselect the text.
- Let’s move the navbar into position using the layout grid we’ve already set up. Turn on the grid by choosing View > Show Layout Grid, or hitting Cmd–Shift–
'
(Mac) or Ctrl–Shift–'
(Windows). - Hold Shift (so it doesn’t move vertically) and drag the group of text links so the right side aligns to the right side of the rightmost aqua column.
Turn off the grid by choosing View > Hide Layout Grid, or hitting Cmd–Shift–
'
(Mac) or Ctrl–Shift–'
(Windows).
Responsive Resize & Stacks
- Scroll far down the artboard to the Island Quick Facts section.
-
Under Island Quick Facts, select the white Kauai info card.
It’s a group, so the whole card will be selected.
- Zoom in so you can see it well.
-
In the Property Inspector on the right notice the switch for Responsive Resize is flipped on and below that the Auto tab is selected.
These are the default settings.
-
Use any of the corner resize handles to change the width and height, just to see how it reacts (don’t worry about making it any specific size).
It resizes pretty well, but let’s see another way.
- Undo that resizing by hitting Cmd–Z (Mac) or Ctrl–Z (Windows).
- If the Layers panel is not open, at the bottom left of the window click the icon.
- Expand the info card group by clicking its folder icon.
-
Notice the contents of the info card group:
- close button
- multiple text layers
- divider line
- a text layer
- button
- info card bg
- With the card still selected, in the Property Inspector on the right, click on the checkbox under Stack.
Nothing visually will change, but in the Layers panel notice that inside the info card group there’s a new Group 2 that XD just automatically made.
- Click folder icon for Group 2 to see what’s inside.
-
Notice Group 2 contains 2 text layers: Kauai and 4th Largest Island.
These have a horizontal layout, while everything else has a vertical layout. So XD had to make this group so they could remain horizontal. How smart!
- Notice there are now only resize handles on the left and right sides. Use the right resize handle to adjust the width.
- That works well, but undo that resizing by hitting Cmd–Z (Mac) or Ctrl–Z (Windows).
-
To adjust the height we alter the spacing between items:
- Hold Shift and tilde (
~
) as you hover over a space between the items in the card. When you see all the spaces highlight in pink drag down/up to adjust the space. - Undo that by hitting Cmd–Z (Mac) or Ctrl–Z (Windows).
- Hold tilde (
~
) as you hover over the space above the Learn More button. When you see the space highlight in pink, drag down to increase the space.
- Hold Shift and tilde (
- We can also rearrange the items. Double–click on The Garden Island text to enter the card’s group (but not edit the text).
Hold Shift (so it won’t move horizontally) and drag The Garden Island text down below the dotted divider line.
Padding
- Select the Learn More button.
-
We’ll be adding a second button in a little bit, so let’s make this a reusable component. In the Property Inspector on the right:
- To the right of Component click the + button.
- Click on the checkbox under Padding.
-
Let’s change the space (padding) around the outside of the button. We could do that by adjusting the Padding numbers in the Property Inspector, but let’s see how to do it using keystrokes.
Hold the tilde (
~
) key and hover over the white space around the Learn More text to see that none of the spaces get a pink highlight. - Double–click on the Learn More button to go into the component group.
Again hold the tilde (
~
) key and hover over the white space around the Learn More text and now you should see a pink highlight!-
Try the following keystrokes (just hover, do not drag):
- Holding tilde (
~
) only puts the pink highlight on the one specific side you’re hovering over. - Holding Shift and tilde (
~
) puts the pink highlight on all sides. - Holding Option (Mac) or Alt (Windows) and tilde (
~
) puts the pink highlight on 2 opposing sides: top/bottom or left/right.
- Holding tilde (
While hovering over the left or right side, hold Option (Mac) or Alt (Windows) and tilde (
~
) so you see the pink highlight on the left and right sides, then drag in a little to reduce the left/right padding.
Nesting Stacks (Stacks Within Stacks)
- Hit Esc to reselect the button component (verify it’s selected by making sure button is highlighted in the layers panel).
- With the Learn More button component selected, drag it over until its left side aligns with the text above.
- With the Learn More button component still selected, hit Cmd–C (Mac) or Ctrl–C (Windows) to copy it.
- Hit Cmd–V (Mac) or Ctrl–V (Windows) to paste it.
- The new button will be placed below, but we want it to the right. Hold Shift and click on the other Learn More button so both are selected.
- Group them by hitting Cmd–G (Mac) or Ctrl–G (Windows).
-
With them still selected, in the Property Inspector on the right:
- Click on the checkbox under Stack.
- Click the Horizontal Stack button .
Now the buttons should be next to each other.
- For the right Learn More button, keep double–clicking on the text until it becomes editable.
- Change the text to Flights and notice how the width of the button changes to fit the new text!
- For the Learn More button on the left, keep double–clicking on the text until it becomes editable.
-
Change the text to More Info, hit Esc to finish, and notice:
- The width of the button changes to fit the new text.
- The button to the right moves as the button width changes.
Optional Bonus: Making The Entire Page a Stack
- To zoom in/out so you can see everything, choose View > Zoom to Fit All.
- In the Layers panel we need to select all the main page sections. Click on the header group.
- Hold Shift and click on the Travel Info group (near the bottom) so all the groups between them are also selected.
-
In the Property Inspector on the right, click on the checkbox under Stack.
This turns each individual group into a stack so adjusting one thing in a section moves down the other things in that section. But for one section to push down another section, we need to put all of these into a group.
- With all the sections still selected, group them by hitting Cmd–G (Mac) or Ctrl–G (Windows).
- In the Property Inspector on the right, click on the checkbox under Stack.
- Now let’s test it out. Click in an empty area of the canvas to deselect everything.
- Zoom in a bit so you can see the 3 sections: Kauai , Oaha, and Big Island.
- Keep double–clicking on the paragraphs of text under Oaha until you can edit them.
-
Put the cursor anywhere in the middle of the large paragraph and hit Return (Mac) or Enter (Windows).
Notice that the Big Island section below moves down!
- Click in an empty area of the canvas to deselect everything.
-
Let’s rearrange the sections on the page. Double–click (just once) on the Oaha section.
This should select only the Oaha section.
-
Drag the Oaha section up (while holding Shift) until it swaps places with the Kauai section above.
Cool!