Skip to main content

Variables in Effects: shadows, blurs


Hoby-Van-Hoose

Variables are missing for Effects like drop shadow, inner shadow, blur, and background blur.

They should be used for the number fields and colors, so we can have dynamically applying themes and sizes for these effects.

12 replies

Pawel_Uchida-Psztyc_SF

It would be nice to be able to use variables in the shadow color effect. Right now I can only pick a color from a variable and then the value is copied but this doesn’t work when I have modes selected.


Hoby-Van-Hoose

I’m hoping this is part of the “and more” mentioned on this page.

Figma Learn - Help Center

Ellu
  • 9 replies
  • November 13, 2023

This feels like a bug. I’m using color variables for theming for multiple customers (e.g. light and dark mode base primitives with subset/brand; subset/brand varied per customer, with functional names cued across modes to primitives). I had to ditch drop shadows on some component states because the tool can’t include its color value for different modes. I think this needs to be there for theming to feel fully usable.


dvaliao
Figmate
  • Community Support
  • 4591 replies
  • November 13, 2023

Thanks for the feedback!

We’l pass this onto our Variables team for future consideration.


Jeremy_Dennis

I have seen workarounds where you would make an object behind your surface with a blur effect. This method allows you to use a semantic color for the shadow. However, I personally would wait until an update comes out. They are coming out with ANOTHER 21+ “little updates” that I hope tackle things like this.


Damir
  • 25 replies
  • January 12, 2024

How frustrating! 🤦‍♂️t3:

Now I have to create duplicate variants for my component showing a light gradient, and another dark for dark mode support.


Slava_Bronevitskiy

We are unable to refactor our design system to use variables instead of multiple style libraries because variables are missing in Effects.

Until then it makes no sense to migrate colors to variables, but keep effects as styles, because those effects force us to still hang on to multiple style library landscape.

😔


Hoby-Van-Hoose

This has been fixed!

I’m able to use Number and Color variables in Effects.


Natasha_Nicholson

We need this for our multi-brand design system i.e. when creating states for buttons: some brands have a drop shadow with various properties, others have drop shadows with different properties, and some brands have no drop shadow at all. I feel like this needs to be included for theming to work properly, and we are in desperate need of it


Roxanne_G
  • New Member
  • 21 replies
  • September 30, 2024

Hey there-- we still aren’t able to convert effect (Drop shadow ) to variables and apply them to other components like buttons, snackbars etc yet correct ? Or did I miss an update. LMK please thank you.


Hoby-Van-Hoose
  • Author
  • New Member
  • 100 replies
  • October 4, 2024

You can’t save the Effects as Variables, only as Styles. So that’s not going to work like you’d want.

You CAN use variables in the effect number fields (e.g., Position, Blur, Spread), so they can be standardized or altered with modes.

You can select colors in the Color field that you’ve defined in the variables but they don’t operate as a variable in the effect, just as like a copied in hex value.


Roxanne_G
  • New Member
  • 21 replies
  • October 4, 2024

Thanks-- so the styles are acting as containers-- just like with Typography-- it is a style-- within Type style , line height, type name etc can be variables. Great. Makes sense. 🙏


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings