I’m making an app in compose - and the designs use...
# compose
s
I’m making an app in compose - and the designs use these shadows in many places, where they surround the outside of the component and then fade. What is the best way to achieve this in Compose?
r
Check the Composable "Card"
It will be a good start 🙂
s
That’s what I’m using now. All that I can do with that is play with
elevation
. It doesn’t match the shadow.
r
Maybe you can look at Card internals to see how they achieve that look, and then create your own composable with more parameters 😉
I know its not much help sorry, but its all I have 😄
s
😄
I found this is a common problem. There is a highly upvoted issue with this - https://issuetracker.google.com/issues/160665122?pli=1
j
There's this gist https://gist.github.com/cedrickring/0497965b0658d6727aaec531f59e8c5c suggesting how you can draw your own shadows. Also, I'd just use elevation and ignore the design requirements 😈