How to create Variables in Figma
In Figma Design (verified 2026-10-24), open the right sidebar Local variables panel (or Resources > Variables), click Create collection, add variables (Color, Number, String, Boolean), optionally add modes (for example Light/Dark or Desktop/Mobile), then bind a fill, stroke or Auto layout gap to a variable via the style hex/number picker.
Variables power design tokens and theming. Edit access is required. Organization libraries can publish variable collections for reuse. Modes let one component swap themes without duplicate frames.
Applies to Figma Design files with can-edit access on plans that include variables. FigJam does not use the same variables system. Dev Mode can inspect applied variables when handoff is set up.
Tokenize colors and spacing
Create a collection
- Open your Design file.
- Open Local variables.
- Click Create collection and name it (for example Brand tokens).
Add variables and modes
- Add Color or Number variables with clear names (color/bg/primary, space/md).
- Create modes such as Light and Dark if you theme.
- Fill values per mode.
Apply to layers
- Select a frame or component.
- In Fill or spacing, choose the variable instead of a raw value.
- Switch the page/frame mode to preview themes.
Our take: name like code tokens
color/text/primary beats “Blue 2”. Designers and engineers should share one vocabulary.
If it fails
- Variables panel missing: view-only seat or older file context — request edit access.
- Cannot bind spacing: use Number variables on Auto layout gaps/padding.
- Modes confusing: start with one collection and two modes before nesting.
- Library out of date: publish the library and enable it in consumer files.
Frequently asked questions
What are Figma variables?
Reusable design tokens (color, number, string, boolean) stored in collections with optional modes.
How do I create a variable?
Local variables > Create collection > add a variable > set values (and modes if needed).
Variables vs styles?
Color styles still exist; variables add modes and broader token types you can bind across properties.
Do variables work in prototypes?
Mode and variable changes can drive prototype theming when frames expose the right modes.
Can developers see variables?
Yes in Dev Mode inspect when variables are applied and your plan/seat allows it.