Skip to main content
Question

Can't assign variable to instance property

  • November 17, 2023
  • 5 replies
  • 1515 views

pterisaur

I’m trying to assign a variable to a property in an instance of a component. The variable and property names are identical, but it seems the menu icon is completely missing from Figma. Is this feature no longer available? My Figma app is up to date.

Variable:
image

Instance property:
image

According to Figma’s support pages, an icon should be visible next to the property:

5 replies

Gayani_S
Figmate
  • Community Support
  • 1911 replies
  • November 21, 2023

Hey Teri, Boolean, number, and string variables can be assigned to component instances with variant properties. Could you share a screen recording with us what you’re seeing on your end?


pterisaur
  • Author
  • New Participant
  • 15 replies
  • November 22, 2023

I just heard back from Figma support — apparently this is a known limitation:

  • Layer boolean properties cannot be attached to boolean variables
  • Variant booleans CAN be attached to boolean variables

Instead of having a layer toggle on/off, I had to create 2 variants, one with the layer showing and one with it hidden.


Dsouza_Trevor

Unless I am missing something, I think you could also attach the visibility of a layer to the boolean variable. If you scroll down on the right side panel to layer, you should find an eye (visibility) icon. Double clicking on it would open a list of boolean variables you could choose from.

You could also do the same for a string variable. Setting the value to “FALSE” even as a string has the same effect as a boolean set to false.


Stan5
  • 35 replies
  • July 10, 2024

A known and ignored limitation, as usual with Figma


Dave_Ackerman
  • New Participant
  • 7 replies
  • January 31, 2025
pterisaur wrote:

I just heard back from Figma support — apparently this is a known limitation:

  • Layer boolean properties cannot be attached to boolean variables
  • Variant booleans CAN be attached to boolean variables

Instead of having a layer toggle on/off, I had to create 2 variants, one with the layer showing and one with it hidden.

 

This is absurd. How do you hide a layer based on a variable then?!


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