Variables not sharing issue

Hello,

Could please help me with this issue? I have a two files, one of them contains styles & components, another app views. I have defined in the styles & components file color variables, unfortunately after updating library variables are not accessible from my second file with app views. Colors in styles are still defined as HEX not variables. Where is the problem?

best regards

Hey Jakub,

Did you copy and paste your variables from your first file to the next?

Keep in mind that, while Variables are still in beta, if you copy and paste objects to different file, the prototype will continue to work as the variables transfer over. However, any unpublished variables 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.

More details available here:
https://help.figma.com/hc/en-us/articles/14506821864087-Overview-of-variables-collections-and-modes#copy_paste

Hi Denise,

I have read your informative reply and was wondering if you can maybe help with my issue as well.

I have created a Figma file and pasted a control inside from a library. For that control I created Local variables so it changes from light to dark mode depending on the frame on which it is placed.

After that I copied another control (that has the same colors as the previous control) inside the file. I expected this control to automatically behave the same since it has the same colors, but it does not. It seems that its colors are not linked to the Local variables.

Is there a way for Figma to automatically recognize that if the same color is used it should be linked to the proper Local variable? Or do you have to, if you paste a new control, always link the control colors manually to the proper Local variable? Is there maybe a plugin that does that automatically? So you could define Local variables once and then all the correct colors would link to them when you paste in a new control?

Thank you for your help!

BR,
Niko

Hello Niko,

to achieve what you want download plugin “Destroyer”. There is an option “Destroy Color Styles”. When you use it, it will match and convert all color styles to your local variables.

best regards,
Kuba

1 Like