Skip to main content

I am building a plugin that identifies whether a component is linked to a design system library. If the component is linked to a library, I want to identify the name of the library it is coming from.

For example, if I use a component from the iOS design system library in my design file, I want to detect that it's linked and show that the component is from the “iOS” design system.
 

How do I get the library name from the node?

This isn’t possible unfortunately.

 

The only method is to first open the plugin in the library file and scan the file for all components, save component IDs along with the file name. Then reference this list to check which of the scanned libraries the component is coming from.


Thanks for sharing the details. ​@Gleb 

1. Can we get component ids using Figma link of the library? or the plugin needs to be run by opening the library file.

2. Is component id dynamic? Like it keeps on changing with the instance of the file opened.


You have to open the file.

Component KEY is static, I misspoke, ID doesn’t matter for this use-case.


Reply