Figma Support Forum

Nested component doesn't react to events


I figured it out :slight_smile: It doesn’t work if the interactive component is in a main component. You have to use an instance to make it work. See file below.

Awesome feature! It’s exactly how it’s supposed to work.

The only problem I have, that a nested interactive component doesn’t seem to work.

I have a button with a hover interaction, which is nested in a card component. When I hover over the button, nothing happens. When I set a click event on the button, the pointer cursor appears, but nothing happens on click.

Any ideas?

1 Like

I looked at your file. You have incorrectly created an interactive on the “On click” trigger. This trigger should not come from the “Default” variant, but from the “Hover”. But the strange thing is that in the master component “Card” it doesn’t want to work. Create an instance of the “Card” component and see that everything works.

1 Like

Yep! The problem is with the main component. In the instance it works.

Thank you for posting the solution, I ran into the same issue yesterday but was too busy “trying around” :slightly_smiling_face: