Skip to main content
Question

Use plugin to copy past item from assets

  • May 26, 2024
  • 4 replies
  • 106 views

Hello everyone,

I want to create a plugin that uses items from the library within the assets section and inserts them onto the page. Is there any similar code available, or is there a part of the Figma API that allows me to view the list of libraries and their assets?

Thanks!

This topic has been closed for replies.

4 replies

Gleb
  • Power Member
  • May 26, 2024

No.

You need to know a component key to import it. You can use REST API to get component keys or ask the user navigate to the library file to get all the necessary component keys, save them in the plugin client storage and then import them in any file.


  • Author
  • May 26, 2024

many thanks. is there any sample or tutorial for this .
i got the teams components keys . how can i add this to another project on my teams using plugin.


Gleb
  • Power Member
  • May 26, 2024

Just use the import function and then component.createInstance(). I don’t know of any tutorials, probably just learn coding basics if that’s the issue.


  • Author
  • May 26, 2024

many thank . i successfully fix my issue .