Skip to main content

I have a component with variants that has an onclick interaction:
image

however, when i created an instance for this component, i need to add interaction-onclick also to switch the contents on my page based on the services links. this overrides my first onclick interaction.

is there any way on how to resolve or prevent this one so that whatever the user clicks on the link, the link will be emphasized (property-onclick of variant) at the same time will display the corresponding content on the page.

TIA!

Figma doesn’t let you do that.
I faced similar issue while creating a prototype to Enable/Disable button on Selecting a Checkbox (having variants Checked/Unchecked onClick).
You’ll need a workaround for that.
Creating variables assigned to the Menu item property.
So for each Menu item, you’ll have to create respective Variable to change their state to Selected, while changing the other menu item states to Unselected.
Menu 1 > Onclick

Set Variable - varMenu1 == Selected
Set Variable - varMenu2 == UnSelected
Set Variable - varMenu3 == UnSelected
Set Variable - varContent == Menu1Content