Skip to main content
Answer

Is there a way to create widget instance using API?

  • July 25, 2023
  • 3 replies
  • 480 views

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.

This topic has been closed for replies.

3 replies

tank666
  • July 25, 2023

Find the widget in the document and clone it.

figma.com

  • Author
  • 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
  • Answer
  • July 25, 2023

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