Skip to main content

Setting/Binding variables to components instances (not layers/properties)


Andre_Constancio

To clarify, this is not about applying variables to component layers (which we know will probably come in future updates), but rather linking or assigning a component instance to a variable, so that we can use it in logical expressions (hopefully sparing us from creating a ton of variables, which is already happening).

Since the relationship between components and variants is very similar to that of Classes and Objects in OOP, it would be interesting if we could access the properties of components by linking them to variables, the way most programming languages do.

Assigning an instance 🔷button of a component to a variable “foo”, we could access each of its defined properties, such as 🔷foo.state = “disabled”

The types of variables could be identified based on the structure already used in components. Nested instances could be presented in a recursive way.

Personally, I believe that this would be a very intuitive way to control variants/components in the same way as we are used to (i have coding background, so i’m definitely biased), but taking advantage of the functionality of variables.

I would love to hear your opinion or suggestions. <3

This topic has been closed for comments

2 replies

Gayani_S
Figmate
  • Community Support
  • 1916 replies
  • July 13, 2023

Thanks for the feedback, @Andre_Constancio . Be sure to also Vote up top, so we can gauge interest from the community.


  • 0 replies
  • October 11, 2023

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.


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