Switch component variant AND open overlay?

Hi there,

I have list of article headlines, listed in the frame “articles”. Clicking on one of them opens an overlay on that entire frame, displaying content of that selected article headline. I do this with an overlay, because I want to preserve the scroll position of the frame “article”.

Now, when returning back to “articles” I want that article headline I just clicked to be greyed-out.

I’ve created a component set which includes that article headline and an interaction within it, to swap the variant when clicking on it to a greyed-out headline. But unfortunately Figma will only “accept” one click: opening the overlay. After closing that overlay, my clicked component remains in the first variant, not the greyed-out variant.

How do I solve this? Am I missing out on something?

1 Like

Excellent! This is exactly what I was looking for. Unfortunately when opening the design file I can’t see what interactions you set where.

You can duplicate the file in your drafts to study it from the inside.

1 Like

Got it :sweat_smile: Thanks again!

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