---
title: "Guide to Variables in Figma - Figma Variables 2024 — Shaheer Malik"
description: "Explore the world of design variables in Figma and learn how to leverage them to create dynamic and flexible design systems."
url: https://www.shaheermalik.com/blog/guide-to-variables-in-figma-figma-variables-2024
language: en
format: agent view of this page (the same content as the page, as plain text)
updated: 2026-11-23
---

[← All posts](https://www.shaheermalik.com/blog)

[UI UX Design](https://www.shaheermalik.com/blog/category/ui-ux-design)

# Guide to Variables in Figma - Figma Variables 2024

Explore the world of design variables in Figma and learn how to leverage them to create dynamic and flexible design systems. Announced in Config 2023, figma variables made UI UX design easier.

Image: Shaheer Malik

Shaheer Malik

Framer Designer & Developer

June 8, 2024 8 min read

Image: Guide to Variables in Figma - Figma Variables 2024

Quick answer

Figma variables store reusable values for colour, number, string and boolean, and support modes for theming. Used well, they replace scattered styles with a token system: primitives hold raw values, semantic variables give them roles, and modes switch themes without duplicating a single component.

At Figma Config 2023, the Figma team introduced a range of innovative features, including the game-changing addition of variables. This new functionality provides designers with a tool to enhance the flexibility and adaptability of their designs.

In this guide, you will discover the essence of variables in Figma, how to create and apply them, and the various types of variables you can use to elevate your design projects.

## **Prerequisites**

While a basic understanding of Figma will be beneficial, this guide is crafted to be accessible to everyone, regardless of their Figma expertise.

## **Who Is This Complete Guide For?**

This guide or tutorial is ideal for anyone keen on learning more about variables, Figma, and design. You will learn how to create a new variable and maintaining your variables all across your figma design.

## **What Are Variables?**

In the context of design and Figma, variables are reusable values, such as colors, text, and other design properties, that can be applied across different components and prototypes. Variables are dynamic elements that can change based on context, making designs more flexible and adaptable. According to the Oxford Dictionary, a variable is "not consistent or having a fixed pattern; liable to change." In Figma, this means that variables can store values that can be reused and modified throughout your design projects.

### **Differences Between Variables and Styles in Figma**

While both variables and styles aim to improve your workflow. These two kinds of design properties serve different purposes:

- **Variables**: Allow you to define and reuse values like colors, text, and spacing across your designs. They are dynamic and can change based on different contexts. For example, a variable can help you switch between light and dark modes or adjust padding values for different devices. This enhance the prototyping actions.
- **Styles**: Are predefined sets of design properties such as text styles, color styles, and effect styles. They help maintain consistency but are not as dynamic as variables. Styles are typically used for maintaining consistent design elements like button styles, text headings, or color palettes.

### **Why Are Variables Important to the Design Process or Design System?**

Variables play a crucial role in the design process for several reasons:

1. **Consistency**: They help maintain a uniform appearance across your design system by defining variables for colors, typography, spacing, and other design elements.
2. **Adaptability**: Designers can quickly experiment with different values by adjusting the variables, which is valuable when creating designs for different platforms or devices.
3. **Efficiency**: Updating a variable updates all instances of that variable in the design automatically, saving time and effort.
4. **Scalability**: Variables are particularly useful in large projects or design systems because of their scalability and ease of maintenance. They allow designers to scale their designs without losing control.
5. **Developer Hand-off**: Providing developers with precise values for design elements reduces the chances of misinterpretation and streamlines the implementation process.

## **Creating Figma Variables**

Figma supports four types of variables: Color, Number, String, and Boolean. Let's explore how to create and implement each type.

### **Creating Color Variables in Figma**

Color variables are used for color fills in your design. Here's how to create them:

1. **Open a New Figma File**: Start with a blank canvas.
2. **Choose a Color Palette**: Select colors that complement each other for your project. A well-chosen color palette ensures consistency and visual appeal in your design.

1. **Create Variables for Each Color**: Go to the right-hand panel, click on "local variables," and create a new color variable. Name each variable according to its role, such as "Primary Background" or "Secondary Text."

1. **Group Variables**: Organize your color variables into groups for better management. For example, you can group colors used for backgrounds, headers, buttons, and so on.

### **Creating Color Variables for Design Tokens**

Tokens are another way to organize color variables, especially for text, surfaces (such as backgrounds), and borders. Here's how to create color variables for tokens:

1. **Create a New Collection**: Name it "Tokens."
2. **Create and Group Variables**: For text, surfaces, and borders, using names like "text/primary." This helps in managing the variables efficiently and ensures that each variable is used for its intended purpose.

### **Implementing Color Variables in Your Designs**

Applying color variables to elements in your design ensures consistency across your project. For example, use the primary button color variable for all buttons to maintain a uniform look and feel.

1. **Select an Element**: Click on the element you want to apply the color variable to.
2. **Go to the Fill Section**: On the right-hand panel, click on the Fill section.
3. **Apply the Variable**: Click on the style icon (the four-dot icon) to bring up a list of your color variables. Select the appropriate variable for the element.

### **Creating Different Modes with Variables**

Creating different modes, such as light and dark modes, can be easily managed with variables. Here's how to set up different modes:

1. **Create a New Collection**: Name it "Modes."
2. **Define Values for Light and Dark Modes**: Assign different colors to your design elements for each mode. For example, set background colors, text colors, and button colors for both light and dark modes.
3. **Apply Variables to Design Elements**: Ensure that your design elements are tied to the variables created for each mode. This way, switching between modes will automatically update the design elements accordingly.

### **Creating Number Variables in Figma**

Number variables are used for properties like dimensions, corner radius, and auto layout properties. Here’s how to create number variables:

1. **Select the Variable Type**: Choose Number.

1. **Name and Set Values**: For instance, create a variable named "OrderCount" with a default value of 1.

1. **Tie Variables to Design Elements**: Apply the number variable to text elements that need dynamic updates. For example, the number of items in a cart or the quantity of a product.

### **Creating String Variables in Figma**

String variables are used for text layers and variant properties. They allow you to change headings, flip text on different screens, and switch between languages. Here’s how to create string variables:

1. **Select String Variable Type**: Create a string variable.

1. **Assign Different Text Values**: Use string variables to manage different text elements that change based on mode or context.

### **Creating Boolean Variables in Figma**

Boolean variables are used for toggling between two states, such as layer visibility or variant properties. Here’s how to create boolean variables:

1. **Select Boolean Variable Type**: Create a boolean variable.
Image: Guide to Variables in Figma - Figma Variables 2024
2. **Assign True or False Values**: Use boolean variables for elements like checkboxes, toggles, or any component that has two possible states.
Image: Guide to Variables in Figma - Figma Variables 2024

## **Use Figma Variables for Advanced Prototyping**

Variables can significantly enhance your prototyping capabilities in Figma. Here's how to leverage them for advanced prototyping:

### **Advanced Prototyping with Number Variables**

Prototyping number variables involves creating interactions that dynamically change number values. This is useful for scenarios where users can adjust quantities, such as adding items to a cart.

1. **Create a Component**: Start with a frame containing the number element.

1. **Make the Frame a Component**: Select the frame and click on the component icon.
2. **Add Variants**: Create variants for the component to handle different states (e.g., default, hover, active).
3. **Set Interactions**: Define interactions for the plus and minus buttons to adjust the number variable. For example, clicking the plus button increases the number variable by 1.

1. **Test the Prototype**: Ensure that the interactions work as expected by testing the prototype.

### **Advanced Prototyping with Boolean Variables**

Boolean variables can be used to create interactions for components like checkboxes and toggles. Here’s how to prototype boolean variables:

1. **Create a Component**: Start with a frame containing the boolean element (e.g., a checkbox).

1. **Make the Frame a Component**: Select the frame and click on the component icon.
2. **Add Variants**: Create variants for the component to handle different states (e.g., unchecked, checked).
3. **Set Interactions**: Define interactions for the boolean variable to toggle between true and false states. For example, clicking the checkbox toggles its state from unchecked to checked.

### **Learn How TO Use Variables for Developers - APIs**

Variables are also beneficial for developers, especially when integrated with APIs. Figma supports variables in its Plugin API and REST API, making it easier to manage and manipulate design elements programmatically.

#### **REST API**

The REST API includes endpoints for querying, creating, updating, and deleting variables. To use this API, you must be a member of an enterprise plan.

#### **Plugin API**

The Plugin API provides support for creating and reading variables, as well as binding variables to components. This is useful for building plugins and widgets that interact with design elements.

#### **Widget API**

The Widget API, connected to the Plugin API, allows widgets to use the Plugin API. Widgets are interactive elements that extend the functionality of design files and FigJam boards.

## **Conclusion**

Variables in Figma are a powerful feature designed to enhance your design process. They provide flexibility, adaptability, and efficiency, making it easier to create consistent and scalable design systems. By incorporating variables into your workflow, you can save time, maintain consistency, and create adaptable designs.

The key to mastering variables is practice and exploration. The more you use them, the more proficient you will become. So dive in, experiment with different types of variables, and see how they can transform your design projects.

Thank you for reading this comprehensive guide on variables in Figma. We hope you found it informative and helpful!

FAQ

## Frequently asked questions

01 What are Figma variables used for?

Storing reusable values — colours, spacing, strings, booleans — and switching them by mode. They are how a design system expresses tokens and themes inside Figma.

02 What is the difference between variables and styles in Figma?

Styles bundle visual properties; variables store single values that can reference each other and change by mode. Variables support theming and logic, which styles cannot.

03 How do you use modes in Figma variables?

Define one set of semantic variables and give each mode — light, dark, brand — its own values. Switching the mode on a frame re-themes everything bound to those variables.

[Figma](https://www.shaheermalik.com/blog/tag/figma) [Design Systems](https://www.shaheermalik.com/blog/tag/design-systems) [Design Tokens](https://www.shaheermalik.com/blog/tag/design-tokens)

Share: [X / Twitter](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.shaheermalik.com%2Fblog%2Fguide-to-variables-in-figma-figma-variables-2024&text=Guide%20to%20Variables%20in%20Figma%20-%20Figma%20Variables%202024) [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.shaheermalik.com%2Fblog%2Fguide-to-variables-in-figma-figma-variables-2024)

Want it done for you? I offer [UI/UX design](https://www.shaheermalik.com/services/ux-design-agency) on a fixed price, from $700\. [See pricing](https://www.shaheermalik.com/pricing).

On this page

- [Prerequisites](#prerequisites)
- [Who Is This Complete Guide For?](#who-is-this-complete-guide-for)
- [What Are Variables?](#what-are-variables)
- [Differences Between Variables and Styles in Figma](#differences-between-variables-and-styles-in-figma)
- [Why Are Variables Important to the Design Process or Design System?](#why-are-variables-important-to-the-design-process-or-design-)
- [Creating Figma Variables](#creating-figma-variables)
- [Creating Color Variables in Figma](#creating-color-variables-in-figma)
- [Creating Color Variables for Design Tokens](#creating-color-variables-for-design-tokens)
- [Implementing Color Variables in Your Designs](#implementing-color-variables-in-your-designs)
- [Creating Different Modes with Variables](#creating-different-modes-with-variables)
- [Creating Number Variables in Figma](#creating-number-variables-in-figma)
- [Creating String Variables in Figma](#creating-string-variables-in-figma)
- [Creating Boolean Variables in Figma](#creating-boolean-variables-in-figma)
- [Use Figma Variables for Advanced Prototyping](#use-figma-variables-for-advanced-prototyping)
- [Advanced Prototyping with Number Variables](#advanced-prototyping-with-number-variables)
- [Advanced Prototyping with Boolean Variables](#advanced-prototyping-with-boolean-variables)
- [Learn How TO Use Variables for Developers - APIs](#learn-how-to-use-variables-for-developers---apis)
- [Conclusion](#conclusion)

Keep reading

[ UI UX Design Shaheer Malik Stripe Checkout UX: A Design Case Study A UX teardown of Stripe Checkout — how the world's best payment flow removes friction, builds trust and lifts conversion, with lessons for your own checkout. August 6, 2026 6 min read](https://www.shaheermalik.com/blog/stripe-checkout-ux-design-case-study)

[ Product Design Shaheer Malik How to Set Up Design Tokens in Figma (2026 Guide) A practical, step-by-step guide to setting up design tokens in Figma variables in 2026 — from primitive colours to semantic tokens, light/dark modes, and syncing to code as JSON or CSS custom properties. July 4, 2026 6 min read](https://www.shaheermalik.com/blog/how-to-set-up-design-tokens-in-figma)

[ Product Design Shaheer Malik 12 Best Design System Examples in 2026 The best design system examples in 2026 — Carbon, Polaris, Atlassian, Material, Ant Design and others — and the practical lesson each one offers for building a system that scales. July 4, 2026 6 min read](https://www.shaheermalik.com/blog/design-system-examples)

## What you can do here
- Get a fixed-price proposal: https://www.shaheermalik.com/proposal/chat (describe the project in a sentence or two)
- Free website audit: https://www.shaheermalik.com/audit?site=example.com (replace example.com with the site; the score needs no email)
- Book a free scope call: https://www.shaheermalik.com/fixed-price-website#book
- Contact: https://www.shaheermalik.com/contact
- Prices and facts for the whole site: https://www.shaheermalik.com/llms.txt

## Structured data

```json
{
 "@context": "https://schema.org",
 "@type": "BlogPosting",
 "headline": "Guide to Variables in Figma - Figma Variables 2024",
 "description": "Explore the world of design variables in Figma and learn how to leverage them to create dynamic and flexible design systems. Announced in Config 2023, figma",
 "abstract": "Figma variables store reusable values for colour, number, string and boolean, and support modes for theming. Used well, they replace scattered styles with a token system: primitives hold raw values, semantic variables give them roles, and modes switch themes without duplicating a single component.",
 "image": [
  "https://media.shaheermalik.com/blog/legacy/929ef15e-wivh59c.jpg"
 ],
 "datePublished": "2024-06-08T09:51:06.575+00:00",
 "dateModified": "2026-08-12T00:00:00.00+00:00",
 "author": {
  "@type": "Person",
  "name": "Shaheer Malik",
  "url": "https://www.shaheermalik.com"
 },
 "publisher": {
  "@type": "Person",
  "name": "Shaheer Malik",
  "url": "https://www.shaheermalik.com"
 },
 "mainEntityOfPage": "https://www.shaheermalik.com/blog/guide-to-variables-in-figma-figma-variables-2024"
}
```
