Skip to main content

Figma Variables: String type for Parent variant


Natalie_Doronina

String type can be applied to variant instances now.
Do we have any way to apply the string variable directly to the parent variant?

Use case: I want to apply the string variable to the parent variant of the secondary button and define the style of the button by theme. So the first mode - is filled, second - is outlined. But I can apply the string variable only for instances.

The problem: I have a lot of already-created screens and don’t want to find all instances to do the same job.

This topic has been closed for comments

5 replies

dvaliao
Figmate
  • Community Support
  • 4606 replies
  • July 6, 2023

Thanks for the feedback, @Natalie_Doronina!

We’ll pass this onto our team for consideration.


  • 1 reply
  • July 18, 2023

I support this! I have components that have different layouts for desktop and mobile and can’t have them easily adapt to the desktop and mobile modes just on numeric variables alone. Being able to select the desktop or mobile variant of the component with a string variable would solve this, but it’s not viable as a solution for a design system if this can be only done per instance.


Natalie_Doronina

I solved that situation by adding a boolean stroke, boolean bg, and added more layers to the component, in each state.


Natalie_Doronina

I solved this with new collection “Devices”.
So you can switch it easily the same way as “Themes”.


  • 0 replies
  • October 17, 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