Can't choose instance when creating an instance swap property

[ Edit: it looks like you can’t apply the instant swap property to a component variant within a given component. It worked when I removed the variants from the component set and simply put those components in an auto-layout frame.]

Hi!

I have a button component with an icon. The icon is a (variant) instance of a component set. The icon instance is at top level of the button component – not nested. There are no errors in the icon component set (e.g., no duplicate names, etc.) Both the button component and the icon component set are local.

When I try to add an instance swap property to the icon instance in the button, it doesn’t allow me to select an instance of the component set to choose the default icon for the button: I can only select the component set itself.

The same thing happens when I try to choose an icon from the button instance.

Am I doing something wrong? Please view the attached video.

1 Like

Hi Joseph,
Try create icons with Create multiple component,
and name component like:
icon/1
icon/2
icon/3

I had the same problem here. I think “Instance swap property” should work with variants as well. I had to ‘break’ the Variants in order to swap this on the father element. =(
Hope fig guys fix this.

1 Like

Same here, got the same issue.

This would be a huge step if we could 'instantly swap property" with variants and not with multiple component.

image

instead of swapping this would just mean showing all properties of all child elements at all levels. this is something that a nice plugin does today already (im not its creator, just user)

1 Like

I’m struggling to see the value in this feature compared to just creating a bunch of variants for icons and using a normal property selector to swap them out. Is there a use case where instance swap is really helping solve a problem beyond this? Genuinely curious. I’ve found most of the new property updates really helpful (except that updating my DS and patching things up across my prototypes has been a lot of work, but worth it in the end).

1 Like

You can swap entire screens using this feature, not just icons. Those screens might not be a part of a variants set. Imagine you have a universal app structure with a header and a footer and you want to swap content between them.

1 Like