Skip to main content
Question

Local Variables Unavailabe to Use With Components

  • March 19, 2025
  • 1 reply
  • 8 views

Jtwitkow

I built a component, added a string variable, which I called from an on-click event setup on a button.  It was working great.  The next day the variables were gone, and because of it, I can’t control the action on the component.

 

Here’s the local variables (I added a color and a second string, just for testing I really only need the first one in the list):

 

 

Here’s a screenshot showing what is available when I try to apply one of those variables (note, the variables are created right in this file, yet when I select “Created in this file” they don’t show up - those two variables that are displaying, are in a different collection, but there’s 8 other variables below those that don’t show either):

 

I cannot figure out what happened.  They WERE showing up when I first created them, and I was using them successfully.  Now they’re not listed as available variables that can be applied.  You can see that they’re in the collection called “Routing Switcher” which was created right within this page.  So they’re showing in the window on the left, but not in the list on the right. 

Any help would be VERY appreciated!  Thanks.

1 reply

  • Figmate
  • 1788 replies
  • March 20, 2025

Hi ​@Jtwitkow, Thank you for reaching out.
 

I understand that you want to apply a string variable but are unable to select it in the library picker.

Thanks for those screenshots! I see in the second one that you opened the library picker by clicking the variable/property icon in the “Appearance” area.

 

Basically, from here, you can use a boolean variable to toggle the visibility of the selected layer. You can also use a string variable, but only if it says “true” or “false.”

So, what you're seeing is pretty much how it's supposed to work.

 

String variables can be applied to text content or font properties.

Please check the "Apply a string variable" section of this guide for more details: Apply Variables to Designs.

You can also refer to this article about the types of variables and where they can be applied: Overview of Variables, Collections, and Modes.

It seems you want to use a string variable for your prototype. In that case, I also recommend reviewing this article: Use Variables in Prototypes.
 

If you are trying to apply the variable in a place where its type should be applicable but it’s not working, please check the scope of the variable.

Scope a variable to limit which properties the variable can be applied to. You can learn more about this here: Create and Manage Variables.

 

I hope this helps. Thanks again for reaching out.


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