How to create a local variable in Figma

Learn how to create a local variable in Figma: open the Variables panel, pick a type like Color, name it, set a value, and see it in the table.

Quick answer

To create a local variable in Figma, open the Variables panel from the left sidebar, click Create, and choose a variable type such as Color. Figma adds a new row to Collection 1. Type a name, then enter a value such as a hex code, and the variable appears in the table.

Steps at a glance

  1. Open Variables from the left sidebar
  2. Click Create
  3. Choose a type such as Color
  4. Type a name for the variable
  5. Enter a value
  6. Check the new row in the table

Interactive demo

Loading demo…

Summary

Local variables store reusable values such as colors and numbers inside a single Figma file. Creating one gives you a named value you can reuse instead of repeating the same raw value across your design.

Step-by-step guide

  1. Step 1

    Open Local variables

    With nothing selected on the canvas, click Variables in the left sidebar. The Variables panel opens and shows that no variables exist in the file yet.

  2. Step 2

    Create a variable

    Click Create in the Variables panel. A menu lists the variable types you can choose from.

  3. Step 3

    Choose a variable type

    Pick Color from the menu. Number, String, Boolean, Timing and Easing are also listed if you need a different kind of value. Figma creates Collection 1 and adds a new variable row.

  4. Step 4

    Name the variable

    The name field of the new row is ready for typing. Enter a clear name for the variable, then press Enter to confirm it.

  5. Step 5

    Set the value

    Click the value field in the same row and enter a color value, for example 0D99FF. Press Enter and the variable appears in the table with its name and value.

Why this matters

You keep typing the same brand color into every shape and want one place to change it. Creating a local variable gives that color a name and a single value, so your file stays consistent and easier to update.

Frequently asked questions

  • Which variable types can I create?

    The Create menu lists Color, Number, String, Boolean, Timing and Easing.

  • Where does a new variable go?

    Figma places it in Collection 1, which it creates when you add your first variable.

Create interactive demos like this one — free, no coding required.

Start for free →