Skip to main content

Component level variables

  • October 6, 2023
  • 1 reply
  • 337 views

jason.puthusseril

Hi! Variables work well for prototyping inside a Figma file, but I’l like to be able to use variables that apply within the scope of a component.

For example, if I have a component that uses a rectangle with a border radius but the rectangle needs to resize, the border radius remains the same and now the rectangle loses the look and feel that it was originally designed with.

Ideally, when I create a component, I could create a component variable that’s value is calculated by some function of the height / width of the component. I’d then set the value of my border radius to that variable. Now, when I create an instance of the component, if it resizes in any way, the border radius changes accordingly.

So if I’ve created multiple instances of this component in my file, each instance’s height / width could be different and it’s border radius would adjust respectively.

1 reply

dvaliao
Figmate
  • Community Support
  • 4611 replies
  • October 31, 2023

Hey @jason.puthusseril, thanks for the feedback!

We’ll pass this onto our Variables team for future consideration.


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