Skip to main content
Question

Support for Icon Plugin Development


Jason_Csizmadi2

I’m developing an icon plugin for my team. The plugin successfully pulls icons from a published DS foundations file into the plugin. These icons can then be inserted into the Figma canvas while maintaining the link to the design system. This part works great.

The problem I’m facing is displaying the icons in the UI. I’ve tried various approaches but haven’t found a solution yet. I’ve added the file key and Figma ID tokens as I understand them. If anyone has experience with Figma plugin development or UI implementation, your insights would be invaluable.

I created an icons.ts file that pulls 5 icons using their specific keys, allowing these icons to be inserted into the canvas.

share.cleanshot.com

Errors that I’m seeing

This topic has been closed for replies.

3 replies

tank666
  • 4873 replies
  • July 10, 2024

Firstly (regarding the error): node id ≠ component key. The IDs should look like this: 1:2, 1:3, …
Please refer to the developer documentation.

Secondly (regarding images): what REST API endpoint are you going to use for images? If, as in the screenshot—Get file nodes endpoint, then did you add the geometry query parameter? Or maybe the Get image endpoint? Have you sent the necessary data (paths or URLs) to the UI?


Jason_Csizmadi2

Thank you, I created a Figma plugin to pull the node id and key component. It not clear to me on why to use one vs the other


Gleb
  • Power Member
  • 4710 replies
  • July 10, 2024

ID is for local access/reference, every node has it. Key is for importing from the library, only components have it. Key is a unique reference across the entire Figma application, not just within the file like ID.


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