| icon | square-check |
|---|---|
| cover | ../../.gitbook/assets/page-header-figma-export-options.png |
| coverY | 0 |
The Export to Figma Options menu has important settings for creating or updating Styles and Variables connected to your Tokens.
Select the Styles & Variables Button from the Tokens page and choose Export Styles & Variables.
The Export to Figma Options menu is the first screen in the flow.
Select the Export Styles and Variables from the Tokens page to configure the Options.
{% hint style="info" %} You can open the menu at anytime using the Options button at the bottom of the Export to Figma modal. {% endhint %}
The Options button at the bottom of the Export to Figma screen is highlighted. Press it anytime to view or edit your Options.
You select which type of Variables and/or Styles you want to export each time you use this feature.
This granular control allows you export a selection of your Tokens as Variables (for example, brand colors) in one step, then repeat the process to export a different selection of Tokens as styles (for example, brand Typography)
Or perhaps you are working on a new project, and your Color design decisions are ready to export, but your Typography is not.
The Export to Figma Options menu is annotated to match the descriptions below.
{% hint style="info" %} For the export to be successful, the Variable and Style types you select must be compatible with your Token Types.
→ Read the Export to Figma overview for a list of Token Types and their compatible Variable types. {% endhint %}
Color - Creates Color Tokens as Color Variables
String - Creates Text, Font Family and Font Weight Tokens as String Variables
Number - Creates Dimension, Number, Spacing, Sizing, Border Radius, Border Width, and Opacity Tokens as number Variables
Boolean - Creates Boolean Tokens as Boolean Variables
Color - Creates Color Tokens as Color Styles
Typography - Creates Typography Tokens as Text Styles
Effect - Creates Box Shadow Tokens as Effect Styles
{% hint style="info" %} You can export different types of Tokens to Variables and Styles at the same time.
colorcan not be exported to Variables and Styles at the same time as the Plugin won't know which property in Figma to attach the Tokens To.
{% endhint %}
The options under the Tokens exported to Figma should label perform additional functions while creating or updating the Variables and Styles types you've selected.
The Export to Figma Options menu is annotated to match the descriptions below.
For Token Names that include groups, the Ignore first part of Token name for Styles option will export the Tokens as Styles with modified names.
This is helpful when your Token Names include prefixes intended for the Design System Team which are not helpful to see in Figma.
For example, a Token named mode-colors.brand.primary.default
With this option enabled will be created as a Style named: brand.primary.default
{% hint style="danger" %}
If your Token Names don't include any groups and you have this option enabled, the Token can't be exported, and you will see an error message from the plugin.
"Some Styles were ignored due to Ignore first part of Token name setting"
{% endhint %}
For example, a Token named mode-colors-brand-primary-default will have the whole name ignored by the plugin, and the Style can't be created without a name.
→ Read the guide on Token Names with Groups for more detials.
Recall that Tokens must have unique names, and a Token Name is the ID to the decision decision. That unique ID can be attached to a Style or a Variable in Figma.
If you are using Themes (pro), you have multiple Tokens with the same name located in different Token Sets which are grouped into Themes.
Multiple Tokens with the same name cannot be exported to the same Figma file as Styles as they will not have a unique ID,
To solve this problem, this option creates a unique ID in Figma by adding the theme-name before the Token Name.
For example, we may have a Theme Group called color-modes with a few themes called:
lightdarkhigh-contrast
Each theme has a Token called mode-colors.brand.primary.default but a unique value. We can't export the same Token to Figma more than once.
So, if you want the color Styles for each theme exported to the same Figma file, you can enable the Prefix Styles with the active theme name setting.
In this example, you would need to run the Export to Figma three times, as each export will only prefix the active theme name.
- Export 1 -
Light themeactive- Return to the themes dropdown, turn this theme off, then repeat with the next theme.
- Export 2 -
Dark themeactive- Return to the themes dropdown, turn this theme off, then repeat with the next theme.
- Export 3 -
High-contrast themeactive
After the three exports, you would see Styles in Figma named (the plugin coverts your grouped named from periods to forward slash):
light/mode-colors/brand/primary/defaultdark/mode-colors/brand/primary/defaulthigh-contrast/mode-colors/brand/primary/default
→ Read the guide on Themes for more details
This setting tells the plugin to connect newly exported Styles with previously created Variables.
This is a multi-step process, detailed in it its own guide.
{% content-ref url="styles-variable-references.md" %} styles-variable-references.md {% endcontent-ref %}
When you update the names of Tokens in the plugin that are currently attached to Styles and Variables in Figma, the Update existing Style and Variable names option ensures Figma will be updated with the new names.
This option moved from the Plugin Settings Page with Version 2.0
When you remove Tokens in the plugin that are currently attached to Styles and Variables the Remove Styles and Variables without connection to a Token setting will delete those Styles and Variables from Figma.
This option moved from the Plugin Settings Page with Version 2.0
{% hint style="danger" %} This option is destructive and can lead to unexpected results!
It should only be used when you are certain you have Variables or Styles that need to be deleted from Figma. {% endhint %}
Once you've configured and saved your Export Options, the plugin will bring you to the Export from Themes or Token Sets page.
Once you've confirmed your Export Options, the Plugin brings you the place where you select which Tokens to export.
Select a card below to jump to the next Guide you are interested in.
| Export as Themes | If you have a Pro licence for Tokens Studio | card-header-figma-export-themes.png | themes.md |
| Export as Token Sets | If you have a Free licence for Tokens Studio | card-header-figma-export-sets.png | token-sets.md |
| Skipped Variables | Sometimes, the plugin skips exporting your Tokens to Figma even when you have the desired options configured correctly. | card-header-figma-variables-skipped.png | |
| Styles with Variable References | Details the steps to use this option with Color, Typography or Box Shadow Tokens. | card-header-figma-styles-var-references.png | styles-variable-references.md |
Figma resources:
- Design in Figma - Overview of Variable Collections and Modes
- The Tokens Studio collection of Variable videos - YouTube Playlist
- Our friends at UI Collective have free learning resources on Variables - YouTube Playlist
{% include "../../.gitbook/includes/something-to-share-subm....md" %}
- Tokens Studio Plugin GitHub - Open issues for Figma export options menu
- Tokens Studio Plugin GitHub - Open issues for setting ignore first part of name
- Tokens Studio Plugin GitHub - Open issues for setting prefix theme name
- Tokens Studio Plugin GitHub - Open issues for update existing name styles variables
- Tokens Studio Plugin GitHub - Open issues for remove styles and variables without connection
- Tokens Studio Plugin GitHub - Open issues for Figma Variables
- Tokens Studio Plugin GitHub - Open issues for Figma Styles
{% include "../../.gitbook/includes/bug-report.md" %}
- Add support for scoping and publishing variables and styles - Feature Request
- Ignore parts of the token name for variables and styles - Feature Request
- Theme Switcher for non-DS designers so I don't need variables anymore - Feature Request
- Tokens applied with Figma UI as Styles or Variables are Fragile - Feature Request
- Create Variable Collections With The Plugin's Order of Themes - Feature Request (blocked by Figma)
- Show updated number of Variables (or styles) when exporting to Figma with updated values - Feature Request
{% include "../../.gitbook/includes/something-to-share-subm....md" %}




