Skip to main content
Question

Is it possible to get information about nested instances from the plugin API?

  • February 28, 2024
  • 5 replies
  • 373 views

Jason42

I’m looking to get data about nested instances in components for a plugin I’m working on. I’d also be keen to know if there’s a Figma plugin developer community I can join too.

Thanks!

5 replies

tank666
  • 4859 replies
  • February 28, 2024
figma.com

You can ask questions, leave feedback and bug reports here on the forum, in the Plugin and Widget API and REST API categories. Also, you can join the developers server on Discord: Friends of Figma.


Jason42
  • Author
  • 2 replies
  • February 28, 2024

Thanks @tank666! I’ll try that but I’m not sure I’ll get the info I need from a recursive function over all a component’s children and all their children. I’m specifically looking for nested instances that are available to interact with from the main component, not just child components within a parent component.
image


tank666
  • 4859 replies
  • February 28, 2024

Judging by your screenshot, these are exposed instances.

figma.com

Jason42
  • Author
  • 2 replies
  • February 28, 2024

Ahh, that might work… although I was trying to access that information from ComponentNode or ComponentSetNode. I guess I can create an instance, get what I need and delete the instance. Thanks again!


tank666
  • 4859 replies
  • February 28, 2024

It is not necessary to create an instance. You can traverse the tree of a component’s children and check the isExposedInstance property on instance nodes.


Reply


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