0
100
200
300
400
500
600
700
800
900
1000
1100
0
100
200
300
400
500
600
700
800
900
1000
1100
Guide · Variables & styles

How to Change Variable Modes in Figma and Build Dark Mode

To change a variable mode in Figma, select a frame, go to Appearance in the right sidebar and use Apply variable mode to pick the mode, for example Dark. To switch a whole page, deselect everything and set the mode in the Page section. Layers inside default to Auto, so they inherit the mode from their parent.

Dark mode works the same way: one color collection with a Light mode and a Dark mode, where every variable has a value for each. Bind your layers to those variables once, then flip the frame between modes. In a prototype, the Set variable mode action does the switching, which needs a paid plan.

Updated Sep 24, 20265 min read
On this page
6 steps

Quick steps

1

Create a color collection

Open the Variables tab in the left navigation and create a collection for your theme colors, for example Theme.

2

Add a second mode

Click New variable mode, or right-click the existing mode and choose Duplicate mode. Rename the two modes Light and Dark.

3

Fill in both values

Create color variables such as surface/default and text/primary, and give each a Light value and a Dark value. Alias primitives where you can.

4

Bind your layers

Apply the theme variables to fills, strokes and effects in your designs instead of raw hex values.

5

Switch the frame

Select a frame, open Appearance → Apply variable mode and choose Dark. Everything inside set to Auto follows.

6

Switch in the prototype

On a toggle button, add an interaction with the Set variable mode action, choose the Theme collection, then choose Dark.

01

How modes work

A mode is a column of values in a collection. Every variable in the collection has one value per mode, so surface/default might be white in Light and near-black in Dark. When you set a frame to Dark, every layer bound to that collection picks up the Dark value. Layers with raw hex fills don't change, which is why binding matters more than the modes themselves.

You add modes with New variable mode or by right-clicking a mode and choosing Duplicate mode, which copies all values as a starting point. If the collection doesn't exist yet, start with how to create variables in Figma.

02

How many modes can a collection have?

It depends on your plan: Professional allows 10 modes per collection and Organization allows 20. Enterprise has no fixed limit through extended collections. We couldn't confirm the Starter limit in Figma's current docs, so check the mode menu in your own file if you're on the free plan.

03

Apply a mode to a frame, a layer or a page

  • Frame or layer: select it, then Appearance → Apply variable mode → pick the collection's mode.
  • Whole page: deselect everything, then set the mode in the Page section of the right sidebar.
  • Children: the default is Auto, which inherits from the parent. Set a child explicitly only when it must stay in one mode, such as a dark footer on a light page.
Put a Light and a Dark copy of the same frame side by side, each with its own mode. You design once and review both themes at a glance.
04

How to change a color variable in Figma

To change what a variable looks like everywhere, edit its value in the Variables view for the mode you want. Every bound layer updates. To change which variable a single layer uses, use Apply styles and variables in the Fill or Stroke section and pick another variable, or hover it and click Detach variable to go back to a raw color.

05

Can you use gradients with color variables?

A color variable holds a single color, but you can apply color variables to the individual stops of a gradient. Select the layer, click the fill swatch, switch to the gradient type, select a stop in the Stops list and apply a variable to it. With Light and Dark values on each stop variable, the gradient follows the mode.

06

Figma variable mode not working

  1. A library variable is outdated or unpublished. A Figma forum thread traces failed mode switches to this. Publish the library changes and accept the update in the file that uses it.
  2. A mode is set explicitly lower down. A mode set on an object applies to it and its nested children, whatever the page or parent says. Reset those layers to Auto.
  3. Layers aren't bound to variables. Raw hex values and detached variables stay the same in every mode.
  4. The layer uses a different collection. Switching Theme to Dark only affects variables in the Theme collection, not a separate Brand or Primitives collection.
07

Dark mode variables not showing in the prototype

Set variable mode changes the mode for the current page, and it changes objects whose mode is set to Auto. Figma's help center adds that "any mode explicitly defined on an object will still be used for itself and any nested children, regardless of the page level mode." So if you set frames to Light by hand while designing, the prototype toggle can't move them. Set top-level frames to Auto and let the page mode drive the theme.

Some designers on the forum report components staying in Light mode in presentation even when the file looks right, with no public fix; Figma support asked them to send the file for investigation. If resetting modes to Auto doesn't help, that's the route. For boolean toggles that don't switch themes, see toggling boolean variables.

08

Sharing a theme across files

Publishing the collection in a library is the standard way to reuse Light and Dark themes. For a one-off copy between files, export the modes as JSON (see how to export Figma variables) or use a plugin that moves whole collections with their modes matched by name.

Ranked listThe best Figma design token and variables plugins in 2026
FAQ

Frequently asked questions

How do I make a dark mode in Figma?

Create one color collection with Light and Dark modes, give every variable a value in both, and bind your layers to those variables. Then set a frame to Dark with Appearance → Apply variable mode.

Why won't my variable mode change in Figma?

Check for an outdated or unpublished library variable first, then for a parent or nested layer with a mode set explicitly instead of Auto. Layers with raw hex values won't change at all.

Why does my prototype stay in light mode?

Set variable mode changes the page mode, which only affects objects set to Auto. Any frame with a mode set by hand keeps it. Reset those frames to Auto and test again.

How many variable modes do I get in Figma?

Professional allows 10 modes per collection, Organization 20, and Enterprise has no fixed limit. Check your own file for the Starter limit, as we couldn't verify it.

Keep learning

More in Variables & styles

All guides in Variables & styles