react-native-shadow-2 icon indicating copy to clipboard operation
react-native-shadow-2 copied to clipboard

Feature request: INSET shadow

Open TomasSestak opened this issue 3 years ago • 6 comments

TomasSestak avatar Jul 09 '21 07:07 TomasSestak

I am struggling to fix a final bug in the next major version. When released, I may start working on that. Meanwhile, if you are not using Expo, you may want to take a look at react-native-neomorph-shadows

ftzi avatar Jul 09 '21 20:07 ftzi

Are there any updates on this? I'm looking for a package that supports inset shadows (like react-native-neomorph-shadows) but since my project is managed by Expo, I can't use it. Do you have any plans on implementing inset shadows in the near future?

lukas-sl avatar May 10 '22 05:05 lukas-sl

Hi, @lukas-sl!

I tried back then to make the inset shadow. While the basics worked fine, I had some problematic cases that I couldn't work around. As no one else requested it (and I never needed it and the requester didn't seem to really want it), it wouldn't worth the effort to try harder.

What is your use case? Can you provide me an image example, maybe in html/css and its code?

I will soon have more free time and I can try to get it working, and release it together with the upcoming 7.0.0 version.

ftzi avatar May 10 '22 10:05 ftzi

Hi @SrBrahma,

thanks for your reply and sorry for my late answer. You can see an example of my use case on https://neumorphism.io/ if you select the "Pressed" variant under the Shape option.

If it's a lot of work to get it working properly, don't bother with it. We just upgraded our project to the latest Expo version which comes with React Native 0.68. This allows us to use https://github.com/Shopify/react-native-skia which provides inset shadows as well.

lukas-sl avatar May 20 '22 07:05 lukas-sl

Thanks!

I am aware of Skia! Before they made their shadow, I was considering to port this lib to use the skia instead of svg, until I saw it didn't support Expo yet. Yup! Looks like their shadow will at some point be more popular than this lib, it's a better technology than SVG with all my hacks to make the shadow.

I haven't used it yet. How their shadow looks like? Can it wraps general components and does it works on the first render without entering the width and height? Does it support what my lib does? No problem if it does and if it's better hehe! I was actually already planning to write about Skia in the 7.0.0 release text, on how certainly the RN's shadow future is by using it.

Anyway, as I got some free time these days, I will try to get the inset done, along with others pendency.

ftzi avatar May 20 '22 18:05 ftzi

any news on this feature.

SMKH-PRO avatar Sep 20 '22 09:09 SMKH-PRO

use this react-native-drop-shadow

Jamal-ReachFirst avatar Oct 27 '22 07:10 Jamal-ReachFirst