I’m trying to create a Stack component to render a bunch of controls on the UI, eg Button group or Chip group. I’ve decided to change the content type using the Swap instance property on each Cell of the Stack (I expect each Cell to be of the same component type after swapping).
It works as expected, only up to the point I try to change variants on one of the components so it propagates the same variant change to other swapped components, which is not what I expect and makes this approach useless.
Here is also a screen recording for greater clarity.
I hope this is something that’s easy to fix because this approach would preserve a lot of variants and components (eg Button group etc). Thank you!
This is the expected behavior. The instances are “linked” with this feature, so you can’t change them separately. You can use my plugin “Selection Variants” to quickly swap nested instances in selection.
Yes, but I’m not talking about changing instances separately, but rather about changing variants of each instance independently.
Btw: your plugin is great, I use it frequently and it’s so helpful! Just trying to utilize native Figma features at max, plus the plugin doesn’t support instance swap property yet, afaik
That’s the same thing if I understand what you mean correctly. Technically each variant in the set is a separate component so by changing one variant property you are changing the instance to be a completely different component. And to change these independently, they need to be not linked with the nested props feature.
Yes the plugin doesn’t support instance swap because this isn’t possible to implement to the fullest with the current API limitations unfortunately.