Have a question to ask or an idea to share? Come and participate in Adobe XD Community. We would love to hear from you and see your creations!
Learn how to work with nested components across design systems in Adobe XD.
Building a design system requires the ability to create components at the molecular levels for optimal reusability and flexibility. When creating components, XD lets you nest them within each other and create complex objects such as menus, card-based layouts, and many more.
Read on to learn how to create and use nested components for a seamless design experience.
Be familiar with these concepts:
Let's first get familiar with some terms associated with nested components:
Using nested components, you can build more robust design systems. When you update a main component, all its instances receive the update, even if the update was done to a component nested inside it.
To create nested components, you can use any of these approaches:
Let’s use Approach A to create a dialog component.
Here are some best practices when creating nested components:
With nested components syncing, changes made to components nested within a main component propagate to all the instances of that main component.
Let's see how that works.
Example 1: A button inside a container that receives changes from the main button.
Now, create two instances of the main button, two instances of the main toggle menu, and an instance of the main container.
Let's look at some scenarios:
Here are some best practices when working with overrides in nested component instances:
Creative Cloud Libraries help you distribute your design system styles and components to be reused consistently across your documents. To build and distribute a design system through Creative Cloud Libraries, curate your design system assets by adding colors, character styles, and components to the Document Assets panel, and publish them as a library to reuse across all your XD and other Creative Cloud applications. For more information on how to use Creative Cloud Libraries, see Work with Creative Cloud Libraries in XD.
In the previous versions of XD, changes made to a nested component did not update across instances of the outer component. To get an improved experience, open your documents in the latest version of XD.
No. When you open an existing document with nested components in the latest version of XD, XD will automatically migrate those components to the new model to get you going as quickly as possible.
When XD opened your document, these specific components did not match their version in the Assets panel. To migrate without data loss, these main components have been converted to instances on canvas. If you want to bring your main component back to the canvas, right-click the outer instance and select Edit Main Component. Then, if you want your main component to look like the instance on canvas, you can transfer any necessary overrides from your instance to the main component.
To get updates, open the linked documents in the latest version of XD. Any documents linked in the future should also be opened in the latest version of XD to ensure correct behavior.
Starting with XD 34, XD no longer supports nesting a main component inside another main component. If you do something that would have previously created a nested main component, the inner component is changed to an instance.
To learn more about nested components in XD, watch this video.
Viewing time: 10 minutes
We've got you started on how to work with components in XD. Take a step forward and learn how to share your designs with designers or stakeholders for feedback.