Skip to main content
Question

Switch component variant AND open overlay?


Felix_Tripp

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?

This topic has been closed for replies.

5 replies

tank666
  • 4873 replies
  • May 18, 2022

Felix_Tripp

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


tank666
  • 4873 replies
  • May 18, 2022

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


Felix_Tripp

Got it 😅 Thanks again!


  • 0 replies
  • June 17, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings