How can I open an overlay and change the icon color at the same time?

Hello,

In my project I have a map with a lot of location icons on top of it, and I created an interaction to open a simple overlay with brief information about the place. It appears when you tap on the location icon.
But I also want the icon to change its color, to show the user which one is the active icon.
I’ve been able to make these two interactions work separately, this way:

For the overlay, I used On tap > Open overlay.
For the color change, I created a two variants of the icon, and used On tap > Change to and changed the Property from active to inactive.

I’m stuck with this, I’d like to know how to make these two things work after tapping the icon.

Thanks in advance :smiley:

Well, I would try few options.

  1. change an icon to on mouse down and open overlay on mouse up or click

  2. Change icon on “while pressing” and open overlay on click

Once overlay is up Figma will freeze other events. Most likely once you close an overlay it would revert the icon state back

Other option would an interactive component with two states. One state would have an inactive icon and another one - active icon with an overlay opened. Overlay could be placed in place or as an overlay interaction

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.