Skip to main content
GMCRuiz
New Member
April 25, 2024

Add Gradients as a variable type

  • April 25, 2024
  • 35 replies
  • 6619 views

Is there any plan to be able to create the gradient itself as a variable? For example, if I wanted some themes to have a solid background variable but others to have a gradient?

35 replies

Kelvin_Lin
New Participant
October 4, 2024

Bumping. This shouldn’t be marked as “Launched”. Variables being applied in styles is great and there are a plethora of workarounds. But now that variables are directly syncing with developers and code, we need more flexibility to make variables viable a long term solution to our products.

So please. Continue fleshing out variables, like adding the ability to create variables that are themselves a gradient.

If anything, let us have a variable be multiple purpose between modes. Maybe for mode 1 it’s simply a colour variable, but let mode 2 be a string instead that is code for a gradient, and let Figma parse that? Then we’re still synced with our developers 1:1

XavierV
Active Member
October 10, 2024

Agree you should remove the Launch because it is not the case. And this is not a solution just a workaround.

Daria_Perreault1
New Member
November 25, 2024

+1 here - we need the ability to add gradients for themes.

Natasha_Nicholson
New Member
November 27, 2024

This has not been launched. We still need the ability to host gradients in the variables i.e. for some brands, the buttons use a gradient and for others, a solid fill. This is just a workaround and doesn’t offer any real value to this particular issue

Jean-Marc_Lehwald1
January 22, 2025
#lovelove #hatehate
Laura A Hartford
New Member
January 23, 2025

+1 for the need to set a gradient as a variable

Also, setting an opacity to a variable

Jesse_Clark
New Member
February 19, 2025

Also looking for this. We sync variables to code and are maintaining gradients as both a string variable and an effect right now. It would be much simpler to manage this all as variables. Is there a reason that effects and variables are independent? I’d understand if there was an architecture decision that has been made that variables are only to represent “primitive” key / value pairs. It’d just be nice to know if this is under consideration or not.

Mihaela_Kolaric
New Member
March 10, 2025

@Celine_D Please let’s make this a thing. :) 

Roy10
New Member
March 13, 2025

Figma has already halfway towards this by accepting variables in gradients. Please also include the gradients as variables. This will make our design system simpler as we have, for example, special buttons in linear gradient (primary/500 to secondary/500), and normal buttons in surface/action (primary/500).

herman
New Member
April 7, 2025

For anyone that wants to replace colors inside of a gradient / text field / drop/inner shadow like figma currently can’thttps://github.com/nimbling/Nimbling_Scripts#replacer-for-figma (It’s under review by the addons team, I just submitted it).