Code Monkey home page Code Monkey logo

Comments (1)

SrBrahma avatar SrBrahma commented on June 3, 2024

Hi @Darhagonable, many thanks for your suggestion!

For your example image, it would be possible if we had the inset (#10) for the inner central part. I've been postergating it for a long while. I will reconsider doing it soon. You would use multiple shadows for each part of this component (maybe 3, 2 for each side and 1 for the inner part).

But, regarding supporting multiple children automatically and following the SVG, I am afraid this isn't possible. The SVG gradient is quite limited: it can only do lines and circles. It wouldn't be possible to follow non-circle curves and different shapes. Also, for multiple children, I don't know if it's possible to make the code smart enough to understand at which sides and corners the shadow should be applied.

Even if I manage to automate your specific case, there will be other cases that it won't work as there are infinite possibilities and problems, I believe.

For your specific case, I recommend using the native Shadow or the https://www.npmjs.com/package/react-native-drop-shadow package, as it gets the resulting view image and apply the shadow around the image.

I will close this as I don't think it's doable. Feel free to contribute with any ideas, though.

from react-native-shadow-2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.