Code Monkey home page Code Monkey logo

react-native-neumorphism's Introduction

react-native-neumorphism

Neumorphism shadows for Android, iOS and Web

screenshot

Installation

yarn add react-native-neumorphism

Usage

import Neumorphism from "react-native-neumorphism";

// ...

<Neumorphism
  lightColor={'#dedddd'}
  darkColor={'#979797'}
  shapeType={'flat'}
  radius={50}
>
  <View style={{ width: 200, height: 200}}>
    <Text>TEST</Text>
  </View>
</Neumorphism>

License

MIT

react-native-neumorphism's People

Contributors

chr314 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-neumorphism's Issues

Bug: Incorrect types

Hello,

I noticed that the type information for the react component is not correct.
It is now a function that returns the react component.

Current version:

declare const Neumorphism: () => ((props: {
    lightColor?: string | undefined;
    darkColor?: string | undefined;
    radius?: number | undefined;
    shapeType?: "flat" | "pressed" | "basin" | undefined;
    style?: import("react-native").ViewStyle | undefined;
    disabled?: boolean | undefined;
    children?: import("react").ReactNode;
}) => JSX.Element) | typeof View;

What I think it should be:

declare const Neumorphism: (props: {
    lightColor?: string | undefined;
    darkColor?: string | undefined;
    radius?: number | undefined;
    shapeType?: "flat" | "pressed" | "basin" | undefined;
    style?: import("react-native").ViewStyle | undefined;
    disabled?: boolean | undefined;
    children?: import("react").ReactNode;
}) => JSX.Element;

Thanks for creating this package!

Doesn't work on iOS.

I tried this in my app. It worked perfectly in Android but didn't work in iOS. I made some modification and ran the Pressed state effect but couldn't work out the FLAT state, which I tried.

Not working on expo managed app

I just try to use the package with expo managed app but it throws err as follow.

Invariant Violation: requireNativeComponent:"NeumorphismCardView" was not found in the UIManager.

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.