Skip to main content
Solved

Extracting mode name from figma API

  • January 15, 2025
  • 1 reply
  • 34 views

Ashutosh Verma

Hello,

I am currently developing a Figma plugin to extract local variables. However, I am facing difficulty in extracting the mode name (which I intend to use for segregating variables based on different modes, such as dark mode and light mode). Could you please advise if there is a method to retrieve the mode name?

Best answer by tank666

Get the VariableCollection object that stores the variables you need and check the value of the modes property.

VariableCollection.modes[i].name

 

View original

1 reply

tank666
  • 4859 replies
  • Answer
  • January 15, 2025

Get the VariableCollection object that stores the variables you need and check the value of the modes property.

VariableCollection.modes[i].name

 


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