Navigate to a frame name that is built with a variable?

I have searched online and in these forums and haven’t seen anyone ask anything like this.

I would like to be able to have the “Navigate to” action navigate to a frame name that is defined based on a variable string.

Example, I have a set of buttons that make a number variable increment up or down within the same frame. Upon a click event I would have an action that would set a String variable to change based on the current number variable (add that new number to the end). Then add another action after this that would navigate to a frame named after this String variable.

It doesn’t look like the Navigate to action can target anything other than a literal frame from a drop down menu. Is there some other approach that might work? Or am I missing something to make this happen?

Thanks for any thoughts!

@Dustin_Rosing As you mentioned “navigate to” (currently) only referances the name of a frame not a variable. But you can use string variables with “change to”, which allow you to change variant states of elements or whole sections on your page.

Below is a simple example using string variables and “change to” interactions — clicking buttons will change the shape:

View prototype
Get the file

1 Like

@Nate_G
Thanks for the reply!
Yes, I understand how variables can do what you have stated and demonstrated. I already have this in place in multiple parts of my prototype. There was just one specific area where being able to specify a destination frame using a string variable for the “Navigate to” action would have been very helpful. I worked around it, but it just meant a lot more frames being added into my prototype.

My conclusion is that this type of function does not exist currently in Figma.

1 Like