What is Figma Variables?
Figma Variables are reusable design values (colors, numbers, strings, booleans) that enable dynamic theming and prototyping in Figma.
What are Figma Variables?
Figma Variables are named, reusable values introduced at Figma's Config 2023 conference (June 2023) that store colors, numbers, strings, or booleans. They live inside collections and support multiple modes — meaning a single variable like color/bg/primary can resolve to #FFFFFF in light mode and #1A1A1A in dark mode without duplicating components. Variables can reference other variables (aliasing), which maps directly to the concept of design tokens. They're scoped to specific use cases — fill, stroke, corner radius, gap, padding, text, or opacity — giving designers granular control. Unlike Figma Styles, which only wrapped visual properties, Variables connect design decisions to code-ready token structures. We use them on nearly every design system project to generate token JSON that syncs directly to our Next.js codebases via Style Dictionary or Tokens Studio.
How it works
Figma Variables operate through three core concepts: collections, variables, and modes.
- Collection: A group of related variables. Think
Primitives,Semantic,Component. - Variable: A named key with a type (
COLOR,FLOAT,STRING,BOOLEAN) and one value per mode. - Mode: A named column within a collection. Common examples: Light/Dark, Desktop/Mobile, Brand-A/Brand-B.
When you apply a variable to a layer property (e.g., set a frame's fill to semantic/bg/surface), Figma resolves the current mode and walks the alias chain to a raw value.
Aliasing is where it gets powerful. A three-tier token architecture looks like this:
// Primitives collection
blue-500 = #3B82F6
// Semantic collection (aliases Primitives)
color/action/primary = {blue-500}
// Component collection (aliases Semantic)
button/fill/default = {color/action/primary}
Switching the Primitives mode from "Brand A" to "Brand B" cascades through every alias, updating thousands of component instances at once.
Figma's REST API (v1) exposes variables via GET /v1/files/:key/variables/local and POST /v1/files/:key/variables, enabling CI pipelines to push or pull token values. Tools like Tokens Studio for Figma (formerly Figma Tokens) and the official Variables API let teams round-trip tokens between Figma and code. We typically export to W3C Design Token Community Group (DTCG) format and run Style Dictionary 4.x to generate CSS custom properties, Tailwind theme extensions, and Swift/Kotlin values.
When to use it
Figma Variables shine when design decisions need to be systematic and multi-modal.
Use Variables when:
- You're building a design system with light/dark themes or multiple brand skins
- You want spacing, radius, and sizing tokens — not just colors — codified in Figma
- Prototyping needs conditional logic (boolean variables driving visibility, number variables driving counts)
- You need a single source of truth that syncs to code via API or plugin
- Your team has more than one designer touching the same component library
Skip Variables when:
- You're doing a one-off marketing page with no reuse intent
- Your team is on Figma's free plan (modes beyond one require a paid plan)
- You only need gradient or image fills — Variables don't support those types yet as of April 2026
- Typography — font family, weight, and size still partially rely on Figma Styles or Text Variables, which remain limited
Figma Variables vs alternatives
| Feature | Figma Variables | Figma Styles | Tokens Studio plugin | CSS Custom Properties |
|---|---|---|---|---|
| Value types | Color, Number, String, Boolean | Color, Text, Effect, Grid | All + typography, composition | Any CSS value |
| Multi-mode | ✅ Native | ❌ | ✅ Via sets | ✅ Via classes/media queries |
| Aliasing | ✅ | ❌ | ✅ | ✅ (var(--ref)) |
| API access | ✅ REST API | ✅ REST API | ✅ Plugin + GitHub sync | N/A (code-native) |
| Code export | JSON via API | Manual or plugin | DTCG JSON, Style Dictionary | Already code |
| Prototyping logic | ✅ Conditionals | ❌ | ❌ | N/A |
Figma Styles are the predecessor — think of them as Variables with one mode and no aliasing. Tokens Studio adds features Figma Variables still lack (typography tokens, border shorthand) but introduces plugin dependency. For teams fully in Figma's ecosystem, native Variables are the starting point; Tokens Studio fills the gaps.
Real-world example
On a recent SaaS redesign, we built a design system in Figma with three variable collections: Primitives (48 color values, 8 spacing values), Semantic (112 aliased tokens), and Component (67 component-specific tokens). We defined two modes — light and dark — and a third "high contrast" mode for WCAG AAA compliance. The Figma REST API exported all variables nightly via a GitHub Action. Style Dictionary 4.1 transformed them into CSS custom properties for our Next.js 14 app and Kotlin values for the Android client. Total token sync time: ~18 seconds per build. Designers toggled modes in Figma to QA all three themes without leaving the canvas, cutting the theme review cycle from two days to half an hour.