Skip to main content
Solved

Is there a way to create widget instance using API?


Without the user interaction, is there a way to create a widget instance?

Best answer by tank666

The plugin cannot create WidgetNodes. The only possible way is to clone already existing nodes in the file.

View original

3 replies

tank666
  • 4858 replies
  • July 25, 2023

Find the widget in the document and clone it.

figma.com

  • Author
  • 3 replies
  • July 25, 2023

Sorry, I meant how to create the first instance i.e. if the document doesn’t have a widget yet.
For example, if the selection has changed, I want to insert an instance. How do I achieve that?


tank666
  • 4858 replies
  • Answer
  • July 25, 2023

The plugin cannot create WidgetNodes. The only possible way is to clone already existing nodes in the file.


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