Moving or copying variables

Has anyone found a way to copy, transfer or move the new local variables to another file or collection?

Just created around 400 color variables manually in the wrong file and would hate having to re-create them in the correct one :sweat_smile:


It seems SHIFT + Enter does the trick after selecting a variable.


Awesome shortcut for duplication, will save some time for sure! :smiley:

You haven’t found a way to transfer the variables to another file though right?

1 Like

I had the same question and found this:

Copy pasting variables across files

Variables can be used in prototypes.

Currently, if you copy and paste objects to different file, the prototype will continue to work as the variables transfer over. However, any unpublishedvariables applied to prototypes won’t be available for further use, like when creating Set variable actions, or switching an object’s number variable.

We are working on improving transferring variables across files. As a workaround, either recreate the variables in the destination file, or duplicate the original file.

If the original file is published to team libraries, copied and pasted variables will work as expected.

If you receive a notification that pasting unpublished variables across files won’t create new local variables yet, try publishing the source library and and enabling it in the destination file.


Ahh bummer, will have to go manual again then, thanks for finding this! :slight_smile: Hope they add the feature soon :crossed_fingers:


Has this feature been added yet? I’ve also made a mistake of generating 100+ variables in a file that I originally intended to delete :frowning:
I was able to publish this file to use the variables in the correct design system file, but I’d hate to leave the wrong file in my pj folder just because I need to use it as a variables library. Is there really no other way to move these variables to the file I want…?


In addition to moving variables from one file to another, I’d also like to have a way to copy aliases and variables within a file. For example, I have 10 variables across 2 modes which all need to have the same alias applied to them. The current workflow requires that I manually assign an alias every time, instead of copying an alias from an existing variable.


I managed to find a workaround by exporting them as json and importing them back via the same JSON

For export I use this plugin:

For import I use this one:

As a caveat for the second plugin, be aware you’ll need to perform some cleanup work post-export. Not a huge deal, but a bit annoying.

If you are going to use the import from the first plugin, it will give you a range exception and you’ll have to reload the file. Just be aware of that !


thanks dude.

I can’t make it work with Variables Export/import, even though I copy the code into a JSON-file. I get error messages when trying to import the file with Vaiables import and also when pasting the code in the window in the Variables Imoprt/Export plugin.

1 Like

Doesn’t work for me either. When I click try to Export the Variable Collection, nothing happens. I can see them as codes and I can see the blue Export Variable CTA but nothing happens when I click on it :frowning:

Hey there! I used this for my colour variable collection and it worked. My project was a website with dark and light mode and I had created the colour variable collection on the Design System file (let’s call it file A). In order to use it on my prototype file (file B), I tried to look for a way to transfer the variables so that I could see what colour in the light mode is equivalent to the one on the dark mode.

Since the variables are not sharable like libraries, I looked into different solutions and here’s what I found:

When you create a set of colour variables, it’s usually saved as local library. (you can see them in Libraries under Local colours). So I published my local library of file A, and used it on as a library on file B. Although it didn’t show me the colour equivalencies as a table, I still could find the equivalent colours by switching between light and dark mode on my file B.

Hope it helps :slight_smile:

This plugin did it for me for 5 seconds:


@Richard_Simms I built a plugin to restore variables used in a prototype and relink them on your new file

here is the tutorial post about:

The export/import function of this plugin is amazing!

Found another free plugin:

I just updated my plugin to move your variables and you can now select the variables you want to move and it will take all the depending variables and copy them to your new file.

I created a small tutorial video for it (4mins), I hope it will help you

In case of any additional questions or desired improvements, don’t hesitate to let me know on the plugin page or here
If you like the plugin and find it useful please feel free to give it a like and share it :hugs: !