Last updated
Was this helpful?
Last updated
Was this helpful?
For the Figma Styles which support Variable values, you can create and manage Styles with Variables references attached to your Design Tokens using the Tokens Studio Plugin for Figma.
This allows you to take advantage of the workflow benefits of working with Tokens Studio in Figma while sharing Styles and Variables with consumers of your Figma libraries.
If this is your first time Exporting to Figma, you'll want to get familiar with the basics of the process, then come back to this guide.
This is a multi-step process that involves a bit of prep work to allow the Plugin to attach your Tokens to the right features in Figma.
Each Token Type that supports Styles with Variable References, specific steps are included in its guide. However, the steps below outline the basics of how tis feature works.
Before you export your desired Tokens to Figma as Styles, ensure your Tokens have been created with Values that reference another token.
It's important that the Tokens being referenced as the value have a unique name from the Token being exported as Styles.
If you haven't already, complete the Export to Figma as Variables process for the Tokens being referenced as the values of the Tokens you want to export as Styles.
In order for the plugin to attach your Styles to the Variables you created, you may have to configure the status of Token Sets included in the export.
The process is slightly different if you are Exporting from Themes or Token Sets.
Open the Theme you want to Export as Styles
Ensure your Theme configuration has:
Token Sets being Exported as Styles are Enabled
.
Token Sets being referenced in their values may need to be set as Reference only
Confirm and save the Theme configuration and close the Theme modal.
Open the Export to Styles and Variables modal and select your Export Options:
The Style Types you want to create are selected (checkmark visible).
The Create Styles with Variable references is selected (switch is on).
Select Confirm to save your configuration and close this menu.
You can open this menu anytime using the Options button at the bottom of the Export to Figma modal.
Select the Themes you want to Export as Styles.
Ensure the themes you have exported as Variables are not selected.
Check the newly created Styles.
If the values are showing hard-coded values instead of your variables, don't worry!
There's a known issue with the plugin where occasionally it needs to create the styles before it can attach the Variable references.
Repeat the Export to Styles flow again, and the plugin will be able to map your variables to your styles.
When you see the name of your Variables in the values of the Styles, the process is complete!
If you are Exporting your Tokens from Token Sets, open the Export to Styles and Variables modal and select your Export Options to ensure:
The Style Types you want to create are selected (checkmark visible).
The Create Styles with Variable references is selected (switch is on).
Select Confirm to save your configuration and close this menu.
You can open this menu anytime using the Options button at the bottom of the Export to Figma modal.
From the Token Sets page, select the Change Sets Button to review your Token Set configuration.
Review your Token Set configuration:
Token Sets being Exported as Styles are Enabled
.
Token Sets being referenced in their values may need to be set as Reference only
.
Save and confirm.
Select the Export to Figma button
Check the newly created Styles.
If the values are showing hard-coded values instead of your variables, don't worry!
There's a known issue with the plugin where, occasionally, it needs to create the styles before it can attach the Variable references.
Repeat the Export to Styles flow again, and the plugin will be able to map your variables to your styles.
When you see the name of your Variables in the values of the Styles, the process is complete!
If you have unexpected results, read the Troubleshooting section below.
Here are the common issues you might run into the first couple of times you try this process.
If the Tokens you exported are created as styles with the correct value, but they are missing the connection to the attached Variable, the plugin is missing the information it needs to attach it to a variable.
Ensure the Tokens you Exported have values that are referencing existing Tokens.
Values are the name of a token inside curly brackets: {token-name}
Ensure the Tokens being referenced have been created as Variables
If not:
Export to Figma as Variables for the Referenced Tokens so they are created
Then repeat the Export to Figma as Styles step above
Ensure the Create Styles with Variable references option is enabled
If the Tokens you exported were created as Styles, but the values are "empty", the plugin is missing the information it needs to populate the values.
Ensure the Token Sets containing the Tokens being referenced in the Values have a status of enabled or reference only.
Ensure the Token Sets containing the Tokens being Exported as Styles have a status of Enabled
If the Tokens you exported were created as Styles, but some of the values are hard-coded and others are referencing Variables, the plugin is missing a connection to some the Variables.
Check your Token Values and Token Types for compatibility as not all Token Values and Token Types are compatible with Variables.
A common example is Typography Composite Tokens with Percentage (%)
in their values for Line Height or Letter Spacing.
The plugin will create the Text Style and show attached Variable references for most properties.
The values with percentages will remain as hard-coded values because Figma does not support numeric values with units.
Select a Token Type guide below for more details that are helpful in troubleshooting.
Figma resources:
Pay close attention to your and ensure the Tokens you want to export as Styles are NOT exported as Variables.
If you are , navigate to the Themes feature in the plugin.
Check your Token Values -
Check your Export Options -
Check your Theme and Token Set configuration outlined in
→
→
Design in Figma -
The Tokens Studio collection of Variable videos -
Our friends at have free learning resources on Variables -
Tokens Studio Plugin GitHub -
Tokens Studio Plugin GitHub -
Tokens Studio Plugin GitHub -
Add support for scoping and publishing variables and styles -
Ignore parts of the token name for variables and styles -
Theme Switcher for non-DS designers so I don't need variables anymore -
Tokens applied with Figma UI as Styles or Variables are Fragile -
Create Variable Collections With The Plugin's Order of Themes -
Show updated number of Variables (or styles) when exporting to Figma with updated values -
Create styles with variable references
is enabled. mode/dark
Theme is selected (checkmark visible) for export. The Options button is highlighted to show how to open the menu. Create styles with variable references
is enabled. Non-local Variables and Styles.
Steps for when your Variables live in a different Figma file.
💡 Something to share?
💌 Visit to contribute or subscribe to updates.
🐞 If you are experiencing an issue not listed here, please reach out to us on the Troubleshooting channel of our , , or send us an email support@tokens.studio