Skip to main content
Question

Is there a way to add an action to a specific variant of a component instance?

  • June 16, 2026
  • 0 replies
  • 0 views

Bergsten Jonas

I am making prototype where I have a button component that have an Enabled and Disabled state.

On this specific instance in the prototype I want to add interaction on only the Enabled state of the button and nothing should happen when clicking the Disabled button. By default the button is disabled and I use a variable to set the Enabled state under certain conditions.

 

Is there a way of adding specific interaction on just this instance of the button component? I can’t add it in the main button component as I want other instances of the button to behave differently.

 

I guess I can use a two buttons on top of each other and hide the disabled button when I want to enable it but that way of solving the problem seems not how it should be.