Skip to main content
Hampus_Svallfors
June 23, 2023
Question

How to use variables for shadows?

  • June 23, 2023
  • 17 replies
  • 11952 views

Hi, I would like to set the color of my shadows with a color variable. I know this isn’t possible with color styles, but does anyone know if it’s now possible now somehow? Hack is ok 😅

Otherwise, I feel having the same component between different variable modes would look strange because the shadow color would have to be the same for all modes, right?

Thanks

This topic has been closed for replies.

17 replies

rugarcia
June 23, 2023

Following, I was wondering the same thing

Dylan_Dickey
New Member
June 23, 2023

I also want to see this. Following, in case someone can come up with a workaround in the short term.

Hampus_Svallfors
June 23, 2023

I just saw in the Config video Deep Dive Training [41:08] that this is coming in version 2. Hopefully before the end of the year.

However, “let’s do it in the next version” is usual product delivery talk for killing great initiatives. Fortunately for us, Figma seem to be operating slightly better than most other SaaS companies 😃

I’ll continue to follow this in case someone comes up with a workaround until v2 👀

Facundo_Cabanne
June 23, 2023

Wondering the same over here! The only workaround I could imagine is to use an absolute positioned rectangle with the shadow color you want as a fill and blurring it out 🫠
Yet this makes absolutely no sense in the long run and it would just be quicker to just let us use variables (and color styles too!) in shadows as Hampus said (coming soon)

image
image

Dina_Sabat-Sporysz
June 27, 2023

This workaround totally makes sense! I gave it a shot, and this “fake shadow” looks just like the real shadow and it works when I apply themes. 😀 I’m gonna use this workaround as a temporary solution until they begin supporting shadows in variables. Thank you for that!

September 27, 2023

Following! I would love to see this functionality added to Figma. My team needs to change the opacity of drop shadows between color modes and it would be great to use variables to retain consistency.

November 3, 2023

Sorry if someone has already asked but I just couldn’t find any info on this. My question is, is it possible to add a color token to dropshadow somehow? In the local variables in Figma.
Thanks

Hampus_Svallfors
November 29, 2023

Not yet @Attila3

Alessandro_Viatore
November 29, 2023

Please please, I would like to support different theme variables also for box-shadow

Pavel_Kiselev
Power Member
November 29, 2023

For a long run it makes sense to have these as components instead