Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Not able to set ShadowColor in Android #17226
Is this a bug report?
Have you read the Contributing Guidelines?
Packages: (wanted => installed)
Steps to Reproduce
Is there way to achieve like this Shadow in Android
See sample code and preview.
Not a bug. You cannot set Eleveation Color in Android:
Instead of using Elevation you can try this React Native Shadow library which uses svg to produce shadow that let you set color, offset, opacity:
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?
I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.
@towfiqi I dont want to use any third party library for shadow so I can not use anything which is out of react-native ... and Yes there is no support for android shadowColor in react-native thats why I asked you I tried elevation props but it will stick to gray color as I mentioned in my issue....
Dont know why rn-bot close this!
Hey @BhavanPatel ,
One hack is to create a view and give it the styles that you wish to give to the shadow and set marginTop negative so that it pushes up to the actual component, and some part of it shows up like a shadow, I had to create a button and applied these styles: