Convert Instance or Frame node to Component node through Figma API

212 Views Asked by At

is there a way how to convert Instance or Frame node to Component node with Figma API? Through UI it's very easy just right click on element and then Create Component like on screenshot below but I need to do it through Figma API.

enter image description here

I found "figma.createComponent()" but it's only for create new empty Component node.

Thanks!

0

There are 0 best solutions below