Figma Support Forum

Copying frames to new file and keep the links to the components?

I know this question must’ve been posted before, but I can’t find answers to this specific case.

I originally had one large design file with everything.
I have been working in breaking down my unified file into the following:

  • A component library file
  • Additional files for features/tickets as needed
  1. My first step was to clean up components and publish them as a library.
  2. I then followed by creating new files, and enabling the newly created component library.
  3. After this, I am manually copying frames to the new files from the original file, but when I paste them, some components remain attached, where others don’t. I don’t think this is expected behavior? Am I missing any steps?

Appreciate any comments/tips, I find it very strange that some elements remain linked whereas others don’t.

I think your approach is slightly incorrect. “Enabling” a library is only a cosmetic change, it doesn’t affect the components in the file in any way. What you need to do is to publish the original file to the library and then copy/paste everything from it into other files.

I’m not sure I follow, I did publish the original file with the components (this file became the library). I enabled the library on the new file only because I thought it might help keep the links. But it only keeps some links and not others.

Got it. In this case are you sure all components are published? If you see some private components in the publishing dialog, you need to add them to the library manually (unless they are only used as nested instances in other instances which you use on the screens).

Thanks for the reply! Yes, I made sure all the components were public.

I’ve updated and republished the library and made sure all the components were public. It seems to work when I copy a single frame, but not when I copy all the frames on the page. This is where some links are lost.

Also, I have a specific master component on that page that I’m only using to organize content on all the frames (not part of the library, just trying to copy the master along with the frames), when I bring it with the elements, they also lose the link to it.

I guess I’ll have to copy frames individually if I want them to keep as much linking to the library as possible.

Here’s a screenshot of the initial and after pasting layers:
Screen Shot 2021-06-01 at 2.17.23 PM

Screen Shot 2021-06-01 at 2.17.38 PM

Yeah, that is the cause of the problem. Copying a component at the same time with the frames should work, but it’s a bit buggy now, sometimes it works, sometimes it doesn’t. Are you sure “modalFooter” component is published? It’s weird that only its instance gets detached and “modalHeader” doesn’t.

After you fix the main component (I guess it doesn’t have footer as an instance too?), you can attach instances back to it with my plugin Master:

  1. Select the new local main component, run Master → Pick Target Component

  2. Select instances that got detached (you can use Select Similar or Similayer plugins to find them by name).

  3. Run Master → Link Objects to Target Component

Got it, yes I know there’s the Master plugin but I think this should work natively (since it’s currently working for modalHeader and yes, I checked multiple times that modalFooter was published because I thought I was going crazy :joy:

Just for the record copying the master component directly also detaches the modalFooter from it

Screen Shot 2021-06-01 at 2.56.29 PM
Screen Shot 2021-06-01 at 2.56.38 PM

Screen Shot 2021-06-01 at 3.01.11 PM

Thanks for the help! I will try using Master although it’s not a sustainable solution since that would be additional cost to something that I’m assuming should work on Figma.

As a last resort, try changing the order of layers (e.g. move the main component to the bottom or to the top of the layers panel). Sometimes it may affect this.