Is there a way to create a completely new component set by using the combineAsVariants function? So without using the second parameter to define the parent?
Parent
is a required parameter in the combineAsVariants
method.
How do you create a new component set otherwise?
Why don’t you want to use the combineAsVariants
method?
Another way to create a new component set is to clone an existing ComponentSetNode
.
Thanks for the tip on cloning an existing ComponentSetNode
!
On the combineAsVariants
method, just lost on what I can set the Parent
argument to without having an existing set. I have multiple components that I want to combine into a new set through a script.
Hi,
I had the same issue the first time I ever started using this method.
For the easiest way to do this you can set the parameter to “figma.curentPage” and it will simply make the set in the page you are now:
figma.combineAsVariants(components, figma.currentPage);
Other options are any other page or frame.
Thank you! This is what I needed. It went completely over my head.