Skip to main content

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.

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.


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


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 😅.


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