I am wondering if I am missing something when it comes to setPluginData, is there a way to set data to a component and it also be attached to its variants and then any added variants?
Page 1 / 1
Per the Friends of Figma Discord per the dev relations contact
…believe any plugin data you store on the ComponentSetNode should be available to instances once the library update is published at
// node.type === "INSTANCE" && node.mainComponent.parent.type === "COMPONENT_SET"
node.mainComponent.parent.getPluginData("YOUR_KEY")
// node.type === "COMPONENT" && node.parent.type === "COMPONENT_SET"
node.parent.getPluginData("YOUR_KEY")
one thing i noticed testing this myself is that the plugin data change alone isnt recognized in Figma as a publishable change, you need to update something else in order to publish the changes in the ui. this is a bug that we are now putting on the backlog, so thanks for bringing this up!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.