Skip to main content

Add the ability to switch the state of a different component variant upon a trigger. Current the component itself has to be the trigger


Sana

I’m working on an ecommerce app and I need the state of the product card on the home page to respond to a trigger from the basket page. I’d love to be able to choose a target component for a ‘Change to’ action.

This topic has been closed for replies.

4 replies

I’m struggling with this one myself. I’ve been experimenting with some (but not complete) success in binding a text variable (with two modes - each named the same as the two variants) to the variant property. With that I can use another component to set the variable of the first component. The problem is I can only change it from one mode (variant) to the other, but not back.


Sana
  • Author
  • 2 replies
  • July 14, 2023

Hey Eric! Yea i’ve been using the same hack however i just find that ‘attach variable’ icon missing from the variant name sometimes! Do you know what the rules are here?
image


Sana
  • Author
  • 2 replies
  • July 14, 2023

Figured it out… seems like assigning a variable to a variant doesn’t work if it’s nested into another component. @Figma_Support this really needs to be fixed 😅.


  • 0 replies
  • October 12, 2023

This topic was automatically closed 90 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