A simple trick to relink components in Adobe Xd
Update: This article was written over a year ago and since then, I have moved to Figma. I am not sure if the solution written here is still relevant. If it is not, please let me know in the comments and I’ll take it down.
If you’re using Adobe XD, you might have realized that the functionality to link components across multiple files is very limited (and counter-intuitive, in my opinion) till the Nov 2019 update at least. I’m specifically talking about the fact that links are attached to the components in parent file and won’t update themselves if you create a new file.
Let me explain the issue in detail. Assume that you’re working in a file name Library.xd where you’ve created all your components and just copying the assets from there for other files. Now, for sake of creating a backup, you ‘save-as’ your file and give it a name say Library-v2.xd and continue working on the new file. You’ll realize that the components you’ve copied to various project files from Library.xd are still connected to Library.xd and links aren’t updated to ‘Library-v2.xd’.
This is extremely frustrating when you’re working on multiple projects and realize that all your links across all your files have to be updated manually. Also, by manual update I mean delete the old instance of the component in all your project files and copy one from Library-v2 since Adobe XD so far doesn’t have any way to update links in such cases. Even their support has listed this as a requested feature but hasn’t introduced it so far. So, is that the only solution? No. I found a simple hack in the system which, as promised above, doesn’t require any plugin.
So, XD has a nice feature where you can have a component within a component. Also, if you delete the component from assets panel, the link of that component with parent file will be removed however the content will stay (as if someone has ungrouped a component). Thus, using these 2 features together leads us to our hack. Say you have some buttons you made in Library.xd and now you wish to connect them to buttons in Library-v2.xd.
- Copy the button (say download button) from Library-v2.
- In Library, locate the button component and double click to make it editable.
- Delete all the contents inside that component and paste the component you copied from Library-v2.
Now we have a component within a component. I guess you have an idea where I’m going next. Right!
- Open the file where you copied component from Library.
- Right-click on component and press ‘Reveal in assets’.
- Once you’ve located that in assets, right-click and press ‘Delete’.
This will delete the component’s link to ‘Library’ however since the content remained is linked to ‘Library-v2’ you’ll get what you need.
That’s it. You’ll need to update all your components manually in the original Library which is a pain, still, it’s way better than tracking all components across all files and replacing them manually.
Does this make your idea of creating backup meaningless? Yes, it does. So, if you need to create a backup, just create another copy of Library.xd and change its name like ‘Library-backup.xd’ Hope that helps. Have a great day