omponents are a great way, in general, to design reusable elements to apply across many artboards in your document or even across multiple documents. Some popular examples of these components are buttons, tickboxes and form fields; just to name a few.
Building reusable components as you design can be a huge time saver allowing you to scale your designs quickly and make changes to these components at any time that will propagate to all other component instances in your design. Although Adobe XD Components and Sketch Symbols have a lot of similarities in the way they work, there are also many differences and that all starts with the name. Here, we’ll break down the differences between Components in XD and Symbols in Sketch.
XD and Sketch use different names for components
In XD we have Components that can be found in our Assets panel. In Sketch they are called Symbols and can be found in the components panel. If you’re starting to get confused, here’s a nice little graphic that will help you to understand the comparison.
To keep things simple throughout this article, I will always use the term, Component, unless I’m specifically talking about Symbols in Sketch.
Although components are meant to be similar when used throughout your artboards, there are many elements you will want to change depending on the use case.
Sketch Symbols allows you to override text and swap nested symbols. But you cannot rearrange elements in a symbol or change colours of symbols without a complex set up of predefined colours that are saved as Symbols themselves.
Because of the limitations of Sketch Symbols, you are often forced to either break the link to that symbol to change things how you want or go back into the main symbol and create a new variation for that single use case.
In Adobe XD, Components behave very similarly to a normal group of elements. You are free to change position, scale, colour and style of any element in a Component instance without affecting the Main Component.
You can also add new elements or delete elements in an instance giving you endless options to control the look and feel. This instance will still always inherit the properties of the main component that have not been overridden.
When working with components, oftentimes you will want to alter the design of an instance while still adopting any changes from the main component. If components have too many constraints, you have to spend additional time creating more components and nested components to accomodate for that new design.
Sketch lets you nest Symbols and resize the parent Symbol itself, but you haven't got the ability to resize elements or Symbols within the instance or reposition anything different than the main. This means you have to either break the link to that symbol to achieve this or create multiple symbol versions every time you want to make a change. The undesirable result is a lot of pre-planning and an overwhelming number of Symbols that can really clutter up your symbol organisation.
XD Components treat all instances like a normal group of elements, allowing complete control to override every part of that Component and even add new elements that don’t exist in the main Component. The great part is you can still adopt any changes from the Main Component that hasn’t been overridden in the instance.
In the above example, we are using a single Component and within the component instance, we are able to override colours, spacing, positioning and even style properties like rounded corners; all while still adopting changes from the Main Component that were not overridden. This same type of control requires dozens of nested symbols inside of Sketch. That’s a lot of set-up! Which brings us to our next category.
Component set-up and organisation
When setting up symbols in Sketch, a lot of thought has to go into the structure and organisation of each symbol. Because you are limited in what you can override in a symbol, you often have to pre-plan many Symbol variations and nested Symbols to anticipate the many use cases you might need in your designs.
Take the above graphic, for example. We have a simple slide out menu that we want to use throughout our artboards. In order to accommodate all of the use cases, four versions of the menu need to be created. We also need many nested symbols for each menu item and section. This means dozens of symbols are needed to create this reusable menu in Sketch.
XD, on the other hand, treats components a little differently, giving you more design control within each instance. This same slide out menu can be created with one component and 3 nested components. Though this approach uses 90 per cent less components, it provides greater flexibility in achieving the flexibility to customise the menu precisely as desired.
In this Adobe XD example, I have created the same menu component, but XD allows me greater flexibility to add as many elements and nested components in this main component without having to create a new menu component just for this scenario.
Sidenote: I am also using the Stacks feature inside this component to easily rearrange menu items and have the layout adjust automatically.
States bring the power of components to a whole new level. Instead of having to create multiple components to show each style of a button, you can include all styles within one component. Buttons are just one example of how states can be useful, but the options are endless.
Symbols in Sketch do not support states, which means you will have to create multiple symbols for each variation used in your design. This can drastically increase the size of the Symbols library by 3x or more. This also means you will have to rely on swapping Symbols to show examples of these new states and in order to use these ‘states’ in a prototype in Sketch it will require many duplicate artboards.
Adobe XD supports Component States that allow you to create these various button versions, all within one component, with the ability to specify which state displays on the artboard.
As you can see in the above example, Component States go far beyond simply grouping states inside one component. You can also incorporate interactions to switch between these states in your prototype.
This example illustrates 11 components on a single artboard. These components have a combined total of 31 states that have built in interactions to toggle between the states which allows them to be interacted with independently. To prototype this kind of control without states would take hundreds of artboards and a lot of stress.
Because states are not supported in Sketch Symbols, it’s safe to assume Symbol interactions are also not supported.
Within XD, in addition to using component states, you can also apply interactions between states that will exist within your component library and be ready to use throughout any instance you apply to your artboards.
Although XD Components and Sketch Symbols serve a similar purpose to allow you to quickly reuse the same element in many places, there are several use cases where you need as much independent control as possible in some areas of the design. XD handles components with the flexibility needed to control every facet of the design and keeps the set-up and organisation very simple so you can focus on what matters most, the experience.