Skip to main content
Solved

How do move to a new frame and populate it with information depending on the button I click?

  • May 22, 2024
  • 1 reply
  • 90 views

Boechat

I am trying to create a detailed view of a list of items.
Imagine I have a list of names, and I want to click on the name and to move to a frame that shows me a picture of the person, along with name and age, for instance.
I don’t want to create a different frame for every person on the list, but rather populate the “detailed view frame” with data from a DB. Any thoughts on how to do that?

Thank you!

Best answer by AlicePackard

Hey @Boechat, this sounds like something that could be accomplished using variable-powered prototype interactions. Are you on a paid Figma plan? You’ll need to be to take advantage of prototyping with variables.

If so, here’s how I’d imagine setting that up: for every piece of data you want to flip between (your examples of “name” and “age”) with each click, you’ll want a string variable.

Additionally, you may want a boolean variable to handle “open” and “closed” states of the detailed panel.

Then you’ll need to set up an “on click” event for each item in the list that not only reveals the detailed view, but populates various text layers with the correct information.

Let me know if this sounds like it would achieve what you described. I’m away from my laptop rn but if you’d like I could try and mock this up or send some screenshots if that’d help.

View original
This topic has been closed for replies.

1 reply

AlicePackard
  • Active Member
  • 194 replies
  • Answer
  • May 22, 2024

Hey @Boechat, this sounds like something that could be accomplished using variable-powered prototype interactions. Are you on a paid Figma plan? You’ll need to be to take advantage of prototyping with variables.

If so, here’s how I’d imagine setting that up: for every piece of data you want to flip between (your examples of “name” and “age”) with each click, you’ll want a string variable.

Additionally, you may want a boolean variable to handle “open” and “closed” states of the detailed panel.

Then you’ll need to set up an “on click” event for each item in the list that not only reveals the detailed view, but populates various text layers with the correct information.

Let me know if this sounds like it would achieve what you described. I’m away from my laptop rn but if you’d like I could try and mock this up or send some screenshots if that’d help.


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