Hi everyone!
Seems like the Compose team is working on adding customizable drop/inner shadows to Compose natively:
https://android-review.googlesource.com/c/platform/frameworks/support/+/2594888
This is super exciting news!
I also think it's the best time to fix a "layering" issue in Compose with the existing shadows.
Currently, elevation-based shadows are living in the Compose
Foundation layer, which is kind of a mistake IMHO. Elevation is very specific to Material, thus should be moved to the Compose
Material layers. I'm not aware of any other design system that really wants this particular implementation of shadows (elevation-based), and even M3 is pulling away from shadows altogether.
Now that the more generic, proper shadow is here, this probably the best time to make this move. It may take a couple release cycles to do this, and a deprecation that developers will have to deal with (though that should be generally painless with
replaceWith
), but it's very much worth it IMHO.
One other thing is to rename it to
elevation
, but that probably not worth it, as `boxShadow`/`dropShadow` are more descriptive, and it's more like
BasicText
and
BasicTextField
, so design systems built on top of foundation can use the nicer
Text
and
TextField
names.
Would love to hear your thoughts!