androidreactjsreact-nativeshadowdropshadow

How to create blurred and colored shadows in React Native Android under view


For ages I was trying to create beautiful, modern components in React Native on Android, however it's seems to be not that easy. What I want to create is something like in here:

view shadow

However, still the only thing that works on android is elevation, with which I cannot make such great effect of drop shadow under the component.

I was trying several libraries to achieve this effect, but no luck. E.g:

Is it somehow possible to create such blurred, colored drop shadow under view?


Solution

  • Figured it out, and the effect is really close to what I posted. I can't change shadow offset and distance, but at least from Android API 28 shadowColor property works, and you can set shadow color different than black.