Skip to main content
Solved

Variant styling changes when I copy-paste a component


Ludo3

Hi everyone,
It’s been a few days now that I’ve had an issue with copy pasting or drag and dropping a button component from my design system. The button would just not be using the same styling properties.

The button includes multiple variants (primary, secondary, ghost…).
Primary is using a green, Secondary is using a grey.
When I copy paste the button with the secondary variant from one file to another, or even drag and drop from the assets section where my Design System component library is and just change the variant from primary to secondary, the styling properties don’t change and the colour changes to an Hex code, instead of calling the colour from my colour palette library (as per all the other components).

For some reasons, I don’t have that issue when I copy paste or drag and drop the component within the Design System Figma file, where the component is.

Did anyone have that issue before and can help? Would love to know what is happening and how I can solve that.

Thank you
Ludo

Best answer by MH22

This really sucks. Sorry to hear that. When did you come across this before? Just now or is the problem already longer existing?

For me it (partially) now worked to

  • CLOSE EVERYTHING
  • RESTART the computer
  • make small changes to the component + UNDO the changes
  • Publish the components again
  • CLOSE everything again
  • OPEN it up again
  • review the changed components and update the affected

REDO what tried before and copy / pasted ready pages / elements in new file

Now some of the “broken” components are now looking the same like in the other file - not all though. Not sure why it works partially now but when the changes are visible it seems to persist till you change anything else again.

Really weird behaviour. Wish Figma Team would look into things like this, this is important that it ALWAYS works and not randomly if you are lucky 😝

View original
This topic has been closed for comments

20 replies

mbrus
  • 5 replies
  • April 28, 2022

I’m experiencing a similar issue. Copy/pasting things from one file to the other leads to different results: styling changes, things go missing, … this happened now with multiple files.


Stefan_Weber

Same here even worse: copying components does not work anymore as soon as text is involved. After pasting i only see unformatted text, that’s all.


Vytas_Butke

Same issue for me, started happening only today - If I copy paste a design from one file to another, color changes to either a different one or a random one for a component.

Could someone please look into this? I can add a video or screenshots since I can replicate it 100%


chris71
  • 2 replies
  • August 17, 2022

Hello @Ludo3 I faced the same problem. The issue is that you are copying all the components at once and pasting them at once.

This Worked for me:
Copy the components but not all at once this will fix the problem.
for instance copy half of it and paste, then do same to the other half.

All the best,
Have a nice Day.


Ludo3
  • Author
  • 3 replies
  • August 18, 2022

Unfortunately, this happened to me with copy pasting one single component, not multiple.


Rene_Tan
  • 7 replies
  • August 18, 2022

I’m been having the same issue suddenly when pasting from a working project to a review project.

Colors changing in elements such as buttons into colors that weren’t defined are being applied, never encountered this problem once in the 9 months we’ve been working on this project.

Isolating components and pasting individually unfortunately had no effect. Completely stumped but I’m finding that I can copy/paste into other projects or test drafts with no issues. It’s gotta be some isolated bug.


MH22
  • 3 replies
  • August 23, 2022

Hi, did you find a solution or are there any more people who experience this?
I experience this especially for nested components which partially use other parts of the component of a library (which are again components or styles).

Do you have all files in the same folder where this happens?
It happens for me also for files which are NOT in same folders (but I cannot change that to check).
So component properties are reset to the basic styles the component has (eg. text changes) when I paste an intance of the component in the other file (either inside or outside the same folder - this seems not to matter).

If I paste an instance of the component in a page INSIDE the same file - this does not happen. (then everything is fine

Components are published and everything.
Looking for an answer and would be happy for any feedback.

This is pretty annoying since I would lose a lot of time to restructure all files and pages again - and am even not sure if that is possible.


Olaf_Blumenstiel

I have the same issue sometimes when adding a component to another file. Mostly issues with the color.


MH22
  • 3 replies
  • Answer
  • August 23, 2022

This really sucks. Sorry to hear that. When did you come across this before? Just now or is the problem already longer existing?

For me it (partially) now worked to

  • CLOSE EVERYTHING
  • RESTART the computer
  • make small changes to the component + UNDO the changes
  • Publish the components again
  • CLOSE everything again
  • OPEN it up again
  • review the changed components and update the affected

REDO what tried before and copy / pasted ready pages / elements in new file

Now some of the “broken” components are now looking the same like in the other file - not all though. Not sure why it works partially now but when the changes are visible it seems to persist till you change anything else again.

Really weird behaviour. Wish Figma Team would look into things like this, this is important that it ALWAYS works and not randomly if you are lucky 😝


Erik_Goens1
  • New Participant
  • 8 replies
  • August 24, 2022

We were experiencing a similar issue, and the underlying problem turned out to be a library referencing issue. The component being pasted in to the new file had an instance of the component that didn’t exist in the original resource. In our case, this happened to be a pre-variant library file that no longer existed. As a result, the styling appeared to be off. That was mainly due to the styles being referenced in a non-existent library.

To “fix” the issue, the new component needed to be inserted into the design. It also wasn’t possible to simply swap libraries because the older version was a non-variant component which would not have naturally transitioned into a seamless library swap experience and in some cases may have done more harm than good.


Kaitlyn_Ho

Same here, I created a master component in a file, publish the component, and paste a variant in another file. Not only did colours become (sometimes different) hex code, icons were also swapped with another variant. Hidden layers were also showing up (potentially because of switching to old master component that weren’t replaced).


Madds
  • 1 reply
  • September 7, 2022

Same problem here 😦
The colour of the icons inside the component is changing when pasted into another file.


vernikr
  • 7 replies
  • October 17, 2022

For me, this was because two components had the same name in a remote library .

Solved by renaming one of the components and republishing the library. Even colors of already pasted components were fixed!


Vitaliy_Debre

Thanks a lot!
That’s worked!


Emily_Holcomb

Hi, what do you mean by “remote library”? A user of mine (I’m DS team lead) is having a similar issue, not sure where to look for a resolution.


vernikr
  • 7 replies
  • June 30, 2023

By remote library I mean a case when Main Components are located in another file (not in the same file you are working in).

I hope eliminating equal names between any Main Components will help.


Karolis_Steponavicius

Hi, this happens for me as well. Copying and pasting component in the same design file. Anyone knows how to fix this???


Carey_Smith
  • New Participant
  • 10 replies
  • August 30, 2023

I’ve been having the same issue (seemingly randomly) when copy/pasting between files.


  • 2 replies
  • September 6, 2023

Thanks, this helped with my problem 🙂


This was the issue, sad that components work by name and not any unseen reference. Should it be any easy solution, if 2 pages have the same component with same objective, I would like to give them the same name


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings