VarVar
Export Figma Variables to JSON, JS, CSV or CSS
Plugin Preview
About this plugin
VarVar is a Figma plugin that allows you to export your Figma variables to JSON, JS, CSV or CSS formats, making it easier to integrate your design tokens into your development workflow.
Features
- Export Figma variables to JSON, JS, CSV or CSS formats
- Identifies linked variables
- JSON: linked variables start with
$.VARIABLE.PATH
* - JS: linked variables are referenced directly like
collection.mode.variable
(unquoted). Numeric paths are converted to bracket notation:collection.mode["500"]
- CSV: linked variables start with
=VARIABLE/PATH
*. CSV Option: “Use row & column positions”. This will produce instead a "formula-like" (i.e.=E7
) linking in spreadsheet programs. - CSS: linked variables will call CSS function
var(--VARIABLE)
. Variable in collections with one single mode will be put into:root{}
, otherwise they will have their own class, i.e..collection--mode{}
- Preview exported data within the plugin interface
- Automatically download exported files
*Note: When dealing with linked variables that have multiple modes, the plugin will only link to the first occurrence (i.e., the first mode it finds).
Usage
Design Mode
- Open your Figma file containing variables
- Run the VarVar plugin from the Plugins menu
- Choose your desired export format (JSON, JS, CSV or CSS)
- Click "Export Variables"
- The exported file will be automatically downloaded
Dev Mode
- Open your Figma file containing variables
- Switch to Dev Mode
- Run the VarVar plugin from the Plugins menu
- Choose your desired export format (JSON, JS, CSV or CSS)
- Click "Export Variables"
- The exported file will be automatically downloaded
Preview and Copy
Toggle the "Preview output" switch to see the exported data within the plugin interface
Use the "Select to Copy" button and copy (Ctrl/Command + C
) the exported data to your clipboard. (Programmatically copying is currently not supported by Figma Plugin APIs).
VarVar is open source, consider contributing. Code available on GitHub.
Bug report, suggestions, etc. Open an issue.
Plugin Details
Version | 4 |
---|---|
Created | February 19, 2024 |
Last Updated | January 7, 2025 |
Category | Software development |
Creator | Felipe Hefler |
Stats | 60 installs, 7 likes |
Pricing | Free |
Technical Details
- API:1.0.0
- UI:src/index.html
- main:code.js
- Document Access:dynamic-page
- Editor Types:figma
- Allowed Domains:
- none
More Like This
Discover other plugins in the Software development category.