Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • Figma Design – Figma Learn
  • Build design systems
  • Variables

Create and manage variables and collections

Written by Figma Man

Updated at June 19th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Administration – Figma Learn
    Manage files and projects Manage a team Manage your account Manage a Figma organization Manage Enterprise plan settings and permissions Billing Manage Figma in a school
  • Figma Design – Figma Learn
    Create prototypes Import and export Create designs Tour the interface Dev Mode Work together in files Build design systems Figma Draw
  • Get started – Figma Learn
    Set up your account Layers 101
  • FigJam – Figma Learn
    Import and export Run meetings Work on boards Tour the interface
  • Community – Figma Learn
    Explore the Community Creator tools and resources
  • Help – Figma Learn
    Troubleshoot Common questions Work with support
  • Work across Figma – Figma Learn
    Figma AI Work across Figma
  • Courses, tutorials, projects – Figma Learn
    Courses Projects
  • Figma Slides – Figma Learn
    Create and edit slides Present slide decks Tour the interface Import and export
  • Figma Buzz – Figma Learn
    Templates in Figma Buzz Create and edit assets in Figma Buzz Overview
  • Figma Make – Figma Learn
    Tour the interface Work with Figma Make
  • Figma Sites – Figma Learn
    Design a site Create webpages and breakpoints Make your site interactive Preview and publish a site Tour the interface
+ More

Table of Contents

Access the Variables modal Create a variable Create an alias Copy and paste variables Edit a variable Scope a variable Add code syntax Edit variables in bulk Create and manage variable collections Create a variable collection Rename a variable collection Delete a variable collection Reorder variable collections in a file Group a selection of variables Rename a group Manage a group

Before you Start

Who can use this feature

Anyone on any plan

Anyone with can edit access to a file can create and edit variables

Looking for more resources on variables? Check out our guide to variables.

Access the Variables modal

Use the Variables modal to create and manage:

  1. Variable collections
  2. Variables
  3. Modes for variables
  4. Variable groups

variables modal with annotations A, B, and C along the top; and annotation D on the left hand side.

To access the Variables modal:

  1. Deselect everything on the canvas by pressing esc or clicking the canvas.
  2. From the right sidebar, find the Local variables section.
  3. Click Open variables.

You can click Toggle sidebar to see additional options in the variables modal.

Create a variable

  1. From any collection, click + Create variable.
  2. Select a variable type from the dropdown.
  3. Give the variable a name in the first column, and a value in the second column.

Tip: You can also create a variable using the eyedropper tool.

Each collection can have up to 5,000 variables.

To duplicate a variable, select one or more variables and press ⇧ Shift Enter.

To delete a variable, right click the variable and select Delete variable.

Tip: Those on Education or paid plans can add additional columns to store multiple values in a variable, allowing you to quickly switch between different contexts in designs. Learn how to create multiple modes for variables.

Create an alias

Create an alias for a variable to link its value to an existing variable. This allows you to implement design tokens and makes managing updates to your designs more efficient.

For example, say you have multiple color variables that reference the same color variable. If that color needs updating, you would only need to update the source instead of manually updating every instance of the color.

A variable can reference other variables of the same type.

The variables modal is open on a collection called Tokens and in a group called surface/compliments. There are three color variables in this group: yellow-1, gold-1, and green-1. The cursor clicks the color swatch for green-1 and a color picker menu pops up. The cursor navigates to the Libraries tab and selects a variable called color/green/200.

To create an alias for a variable:

  1. Open the Variables modal.
  2. Right-click a variable’s value and select Create alias.
  3. From the Libraries tab, choose a variable to set an alias. You can use the search bar to find a variable by name or browse through available libraries.

To detach an alias, hover over the value field and click Detach alias.

Want to learn more about how aliasing works? Check out the Tokens, variables, and styles lesson of Figma's Intro to Design Systems course.

Copy and paste variables

You can copy and paste variables to any collection, including collections in a different file.

  1. Open the desired collection from the variables modal.
  2. Select one or more variables.
    • Hold ⌘ Command for Mac or ⌃ Control for Windows to select multiple variables.
    • Hold ⇧ Shift to select a range of variables.
  3. Right-click the selection and select Copy.
  4. From any collection, right-click and select Paste.

Edit a variable

Hover over a variable’s row and click the Edit variable icon to open its editing modal.

Edit variable modal with annotation letters A through F.

From there, you can:

  1. Change the name of the variable.
  2. Add a description to explain how the variable should be used.
  3. Modify the values of the variable.
  4. Add code syntax.
  5. Hide the variable from publishing.
  6. Scope a variable to limit which properties the variable can be applied to.

Scope a variable

Scope a variable to limit which properties the variable can be applied to. This reduces the guesswork when deciding which variables to use for your designs.

For example, if you scope a number variable to corner radius, the variable can only be applied to corner radius and won't appear as an option for any other supported properties.

Scoping is available for number, color, and string variables.

For number variables, you can scope:

  • Auto layout
    • Gap between
    • Padding
  • Corner radius
  • Font properties
    • Font weight
    • Font size
    • Line height
    • Letter spacing
    • Paragraph spacing
    • Paragraph indent
  • Layer opacity
  • Effects
  • Stroke
  • Text content
  • Width and height

For color variables, you can scope:

  • Effects
  • Frame fill
  • Shape fill
  • Stroke
  • Text fill

For string variables, you can scope:

  • Font family
  • Font weight or style
  • Text string

To scope a variable:

  1. Right-click on a variable, or multiple variables, and select Edit variable. You can also click Edit variable, located to the right of any single variable.
  2. Open the Scope tab.
  3. Use the checkboxes to toggle the variable’s availability in that property. Check Show in all to make the variable available for all supported properties.

The Edit variables menu is open on the Scope tab. The label at the top of this view says Number scope, with over a dozen check boxes and property types. About a handful of boxes are checked.

Add code syntax

Code syntax allows you to represent variables in code using valid variable names to support a seamless handoff experience. A variable’s code syntax will appear in code snippets in Dev Mode when inspecting elements using the variable. Currently, code snippets for variables are supported in CSS, SwiftUI, and Compose. 

Two images side by side. On the left is a view of the Edit variable menu. In the code syntax section, there is one code syntax setting for Web, and next to it is an input field with the string var(--extra-small). On the right is a view the right sidebar in Dev Mode. We can see the code syntax for a border-radius of an object.

You can create one name per platform, including Web, Android, and iOS. This allows for up to three code syntaxes per variable. 

To add code syntax to a variable:

  1. From the Code syntax section of the the Edit variable modal, click Add code syntax.
  2. From the dropdown, choose Web, Android, or iOS.
  3. Use the input box to enter a variable name. A preview shows how the variable name appears in code snippets.

Tip: In addition to viewing the code syntax, there are more ways to work with variables in Dev Mode. You can see variable details and suggested variables, and view local collections on the variables table.

Edit variables in bulk

To edit multiple variables at once:

  1. Open any collection from the Variables modal.
  2. Select multiple variables by using keyboard shortcuts:
    • Hold ⌘ Command / Control and click to select individual variables
    • Hold Shift and click to select a range of variables
  3. Right-click a selected variable and click Edit variables.
  4. From the Edit variables modal, you can:
    • Scope variables, if supported by the variable type
    • Hide variables from publishing

Create and manage variable collections

A collection is a set of variables and modes. Collections can be used to organize related variables together. For example, use one collection to localize text in different languages, and another collection for spatial values.

Create a variable collection

To create a variable collection, go to the sidebar of the variables modal and click More options > Create collection.

variable-collection-more.png

If a variable has not been created in a file, you will need to create a variable first in order to create new variable collections. empty-variable-collection.png

Tip: If your variable collection contains multiple variable modes, you can edit, reorder, and change the default mode my dragging the columns. Learn more about variable modes.

Rename a variable collection

To rename a variable collection:

  1. In the sidebar of the variables modal, open the collections dropdown and choose the collection you want to manage.
  2. Click More options and select Rename collection.

Delete a variable collection

Deleting a variable collection also deletes all of its containing variables. Any properties that were using the variables will no longer be connected to the variable and any existing modes. The variables and collection can only be restored by immediately undo-ing the action or by restoring an earlier version of the file. 

To delete a variable collection:

  1. In the sidebar of the variables modal, open the collections dropdown and choose the collection you want to manage.
  2. Click More options and select Delete collection.

Reorder variable collections in a file

Reorder your variable collections to organize and find variables faster when applying them to designs. Changing the order of variable collections will affect the order in which they appear from the variable mode selector and variable selectors.

To reorder variable collections in a file:

  1. In the sidebar of the variables modal, click More options and select Reorder collections.
  2. From the Collections popup, you can:
    • Click and drag to reorder the collections
    • Or click Sort A to Z to order collections in alphanumerical order

Group a selection of variables

You can further organize variables by adding them to groups within a collection. For example, use one group for colors used for text, and another for colors used on strokes.

To organize variables into a group:

  1. From the Variables modal, select multiple variables:
    • Hold ⌘ Command / Control to select multiple variables
    • Hold ⇧ Shift to select a range of variables
  2. Right-click the selection and select New group with selection.

Click and drag groups in the sidebar of the Variables modal to reorder groups. You can also click and drag groups into other groups to nest them. 

Rename a group

  1. In the sidebar of the variables modal, double click the group name.
  2. Type a new name for the variable group.

Manage a group

  1. In the sidebar of the variables modal, right-click the group name in the sidebar.
  2. From the menu, choose from the following:
    • Ungroup
    • Duplicate group
    • Delete group

Ready to continue your variables journey? Check out the following topics:

  • Publish variables to team libraries
  • Apply variables to designs
  • Create modes for variables
  • Use variables for advanced prototypes

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Overview of variables, collections, and modes
  • Guide to variables in Figma
  • Apply variables to designs
  • Modes for variables
  • The difference between variables and styles
  • Blog
  • Best practices
  • QR code generator
  • Color wheel
  • Colors
  • Color picker
  • Color palettes
  • Color palette generator
  • Color contrast checker
  • Font Library
  • Templates
  • Developers
  • Integrations
  • Affiliate program
  • Resource library
  • Reports and insights
  • Support
  • Status
  • Legal and privacy
  • Modern slavery statement
  • Climate disclosure statement
  • COMPARE
  • Sketch
  • Adobe XD
  • Framer
  • Miro
  • COMPANY
  • Events
  • Customers
  • Careers
  • Newsroom
Expand