Border variable with nested components & instance swaps

Hello, I’m having an issue where I have a generic button with an icon using an instance swap.

I created a border variable and tied it to the layer.

I then created a nested component with that original, made variants, changed the icons, and set up the interaction with “set variable”

When the border changes, it changes for both buttons.


How should I be making buttons with icons & variable interactions so this doesn’t happen and doesn’t become buggy later?

example file

Hey @Adrian19, thanks for reaching out!

This is expected if you bind the variable at the main component level — it will apply to all instances.

Be sure to only use this button for the overlay interaction or add the interaction to the instance, not the component to prevent this from happening.