Chapter 4
IN THIS CHAPTER
Understanding layers
Grouping and ungrouping
Cloning and duplicating objects
Transforming objects
Aligning and distributing
Getting used to an unfamiliar interface can be trying. Something as simple as selecting a single object can cause frustration if you do not have a strong background in or an understanding of the way layers and groups work.
In this chapter, you discover how to organize, select, and group your objects in Adobe XD. You also find out how to scale and rotate your objects, as well as align and distribute them evenly.
If you are an Adobe Illustrator user, you will recognize that layer features in Adobe XD are very similar. Essentially, layers in XD are meant to help you organize your objects. This makes it easier to select, lock, and duplicate your objects. In this section, you find out how layers work.
The best way to explain layers is for you to give it a try yourself. Follow these steps in a document of your own to build confidence in how you use layers in XD:
Create a new file by selecting File ⇒ New. Use any size template that you wish.
In this example, we selected the iPhone 6/7 template.
Click the Layers icon in the lower-left of the window, as shown in Figure 4-1, to see that the artboard, which was created by default, is shown in the panel labeled Artboards. You can also use the keyboard shortcut Ctrl+Y (Windows) or Command+Y (Mac) to toggle the view of this panel on and off.
At first, you might be wondering why an artboard is listed in the Layers panel, but don’t worry — it will make sense after you start adding objects to this artboard. Note that the artboard has the default name based upon the template you selected and the screen number that is associated with this document. Since this is the first artboard, you see the name iPhone 6/7-1.
Select the Artboard tool from the Tools Panel and click anywhere in the work area to add a second artboard.
Note that you now have two artboards listed, with the newest artboard appearing at the top of the list and with a –2 following the template name, as shown in Figure 4-2.
Using the Layers panel that appears when you click on the Layers icon, you can rearrange the stacking order, rename, duplicate, delete, and select artboards.
Click and drag up or down an artboard in the Artboard in the Layers panel in order to move it up or down in the stacking order. If you like working with contextual menus, you can right-click any artboard listed in the Layers panel to see a list of features you can use, including Copy, Paste, Duplicate, Delete, Rename, and Export. Following are other methods you can use to take advantage of these same features.
You can rename your artboards using one of these methods:
To copy your artboard in order to paste it into another document, right-click it and select Copy. Then open a new document or navigate to another open document and choose Edit ⇒ Paste.
To duplicate an artboard, right-click it and select Duplicate. A new artboard immediately appears at the top of the list and in your work area.
You can also duplicate an artboard by holding down the Alt (Windows) or Option (Mac OS) key and dragging the artboard into the work area.
Be careful with deleting artboards. It is very easy to do, because you only have to select an artboard in the Layers panel and press the Delete or Backspace key. Fortunately, this step can be undone using Ctrl+Z (Windows) or Command+Z (Mac OS).
Before trying to select artboards, make sure that you have at least three in your project.
In the beginning of this section, you pressed an icon that stated Layers, yet the information that has been covered thus far has been about artboards. In this section, you see how objects that you create on these artboards automatically create layers that you can use for organizing your artwork.
Make sure that you have a document open so that you can follow along with these steps:
Notice that when you add an object to an artboard it becomes visible as a layer in the Layers panel as well. In Figure 4-4, a rectangle shape was added to the iPhone 6/7-2 artboard. In fact, you only see the active artboard and any objects on that artboard.
Note: You only see the active artboard and any objects that are on that artboard. If you want to see another artboard, you can either press the back arrow to the left of the Artboard name in the Layers panel or simply select an object on a different artboard in your work area. This either takes you back to the entire list of artboards, or directly to the artboard with the selected object,
After you have placed an object on artboard, you can use the Layers panel to perform many functions, including copying the selected object and pasting an object, as well as duplicating, deleting, renaming, locking, grouping, converting your object to a symbol (covered in Chapter 7 of this minibook), and exporting. You can easily access these options by right-clicking on the object in the Layers panel. If you do not have a right-clicking mouse on your Mac, Ctrl-click to see this same contextual menu, as shown in Figure 4-5.
In this section, you have an opportunity to review these functions.
To keep your files organized and make associating interactions easier, consider naming your objects with a logical naming structure. Keep your file names in lowercase, or with just an initial capital, with no spacing to keep it uniform with the typical standard for naming files used in development. Most importantly … name it something you will recognize if you try to select it from a list.
Example might include header_nav or Submit-button.
As with selecting artboards, you can switch to the Select tool and then click on an object to select it, or you can follow these options for selecting additional objects:
Now that you know how to select multiple objects, it seems a logical time to explain grouping. By grouping object, you can keep them together so that selecting them simultaneously is easier. This is especially important if you are building UI made of several parts, such as a button that consists of a shape, icon, and text, as shown in Figure 4-7.
You can group objects by selecting them in the Layers panel and then right-clicking to select Group. You can also group by selecting the items on the artboard and then pressing Ctrl+G (Windows) or Command+G (Mac).
Notice that when you first group items they appear as Group in the Layers panel. You can rename this group with a more logical name so you can identify the object(s) as you work. Do this by double-clicking the word Group in the Layers panel and then typing a new name in the activated textbox.
Use these features if you want to copy something from one artboard to another or from one project to another. Use any of these options to cut and paste:
In order to keep other objects in position, you may want to lock them as you complete working with them. This is a temporary feature … an object can be unlocked at any time.
You can tell when an object is locked because a lock icon appears in the upper-left corner of the object when it is selected, as shown in Figure 4-8.
Use any of these options to lock an object:
You can hide an object to see what is behind it without moving it, or to try various options in your design. To hide an object, follow any of these steps:
The fastest way to hide an object is to click the eye icon that appears when you cross over the area to the right of the named object in the Layers panel. You can see this icon in Figure 4-9.
Additional features such as exporting and making a symbol are discussed in Chapters 5 and 7, respectively, of this minibook.
You can scale and rotate your objects quickly and easily right on the artboard, or you can use a more precise method by using the Properties panel.
Rotate an object right from the artboard by selecting it with the Select tool and then positioning your cursor outside any of the object’s handles. When you see the curved arrows, shown in Figure 4-10, click and drag in the direction you would like to rotate.
You can also select an object and then enter a value in the Rotation textbox in the Properties panel, shown in Figure 4-11.
After you start creating many objects, you need to consider the position of those objects and how they relate to each other. In order to lessen noise in your design, you want to keep icons and text aligned and distributed in a clean manner. You can check your alignment in several ways, including using a grid or using guides.
You can turn on a grid that is only visible to you by following these steps:
As a default, XD provides you with guides that turn on as needed. These are called Smart Guides and should be familiar to you if you use other Adobe Products.
To use the smart guides, simply pay attention to the lines and shaded areas that appear as you work. Note in Figure 4-13 that when the one diamond is dragged, a guide appears indicating that it is aligned with the diamond on the left.
Distribution of objects refers to the space between a bounding box created by a first object and a last object. In Figure 4-14, you see uneven distribution of several diamonds on the left, and even distribution of the same objects on the right. In this example, the spacing is evenly distributed horizontally.
When you position objects, you will see shaded areas appear that indicate when the space between the objects is equal. This shading hint also appears when you Alt/Option drag to clone objects, as shown in Figure 4-15.
The Align and Distribute feature that is available in the Object menu and in the Properties panel can help you keep items in line and spaced evening.
If you select two items, you can take advantage of the Alignment features. If you select three or more objects, you can also use the Distribution features. See Figure 4-16 for a definition of which each icon in the Properties panel represents.
Keep in mind the trick to determining horizontal versus vertical. The horizon is horizontal. Anything going from left to right on your page should be distributed horizontally. Any objects going from the top to the bottom should be distributed vertically.
3.21.246.132