Skip to main content
Solved

Swap text in variants to reflect action


Joanna_Szram

Hello,

I am designing a food delivery app. One of its functions is being able to click on the x on a restaurant card which causes that card to change into “restaurant x hidden. undo?”. I managed to do this, but now I’d like to be able to somehow make the name of each restaurant appear in that box.
image

Is this possible?
Thank you.

Best answer by Dennis_N

Yes, that’s possible by using variables and advanced prototyping.

Checkout this official training file by Figma:

Figma

There are also plenty of videos about variables and prototypes.

Good luck

View original

2 replies

Dennis_N
  • Power Member
  • 181 replies
  • Answer
  • January 16, 2024

Yes, that’s possible by using variables and advanced prototyping.

Checkout this official training file by Figma:

Figma

There are also plenty of videos about variables and prototypes.

Good luck


dr8478552
  • New Participant
  • 1 reply
  • February 8, 2025

To dynamically display the hidden restaurant’s name, store the restaurant’s name in the component’s state when the user clicks the "X" button.  instead of a generic text. If using React, manage this a global state like Redux for scalability. Ensure smooth UI updates and an intuitive "Undo" function for restoring hidden restaurants seamlessly. This approach enhances user experience by providing clear, personalized feedback. Let us know if you need further assistance in implementing this feature effectively in your food delivery app.


Reply


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