All Projects → tokkozhin → React Native Neomorph Shadows

tokkozhin / React Native Neomorph Shadows

Licence: mit
Shadows and neumorphism/neomorphism for iOS & Android (like iOS).

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to React Native Neomorph Shadows

react-native-image-blur-shadow
A React Native Image component with Blur Drop Shadows,100% JavaScript, 0 dependency component. Supports Android, iOS and Web. A light weight <Image/> component for your react native project.
Stars: ✭ 80 (-83.26%)
Mutual labels:  shadow
AndroidJoyStickView
This library lets you create joystick with some customization for android
Stars: ✭ 45 (-90.59%)
Mutual labels:  shadow
Shadowhelper
A library to add shadows for the Android View.(一个方便为Android View添加自然的阴影的库)
Stars: ✭ 322 (-32.64%)
Mutual labels:  shadow
planar proj shadows
Demo of Planar Projected Shadows in regl
Stars: ✭ 31 (-93.51%)
Mutual labels:  shadow
SPPerspective
Widgets iOS 14 animation with 3D and dynamic shadow. Customisable transform and duration.
Stars: ✭ 271 (-43.31%)
Mutual labels:  shadow
modular-deferred-gpu-particle-system
modular particle system using compute shaders.
Stars: ✭ 20 (-95.82%)
Mutual labels:  shadow
shadow
Shadow dom support for Vue
Stars: ✭ 46 (-90.38%)
Mutual labels:  shadow
React Native Cardview
Native CardView for react-native (All Android version and iOS)
Stars: ✭ 426 (-10.88%)
Mutual labels:  shadow
iconplus
Produce icons with extra effect like long shadow, flat shadow, box effect, circle effect and rounded rectangle effect. It support Dynamic text, Font-awesome icons and also google materialized icon. You can make any Font-awesome icon as line icon and add attractive effect to it dynamically. As a output you will get CSS3 code and also you can expo…
Stars: ✭ 34 (-92.89%)
Mutual labels:  shadow
shadow-accrual-maps
Accumulated shadow data computed for New York City
Stars: ✭ 15 (-96.86%)
Mutual labels:  shadow
Android-SGTextView
同时带字体描边 渐变 阴影的TextView - both have stroker, gradient and shadow TextView
Stars: ✭ 18 (-96.23%)
Mutual labels:  shadow
django-undeletable
undeletable Django models
Stars: ✭ 13 (-97.28%)
Mutual labels:  shadow
nvgen-shader-for-unity-speedtree
#NVJOB Shader for Unity SpeedTree. Old, Legacy.
Stars: ✭ 37 (-92.26%)
Mutual labels:  shadow
DeepShadowMap
Real-Time Deep Shadow Maps for Unity3D
Stars: ✭ 36 (-92.47%)
Mutual labels:  shadow
Tintlayout
This library help you to achieve popular drop shadow effect from view.
Stars: ✭ 322 (-32.64%)
Mutual labels:  shadow
react-native-shadow-2
Cross-platform shadow for React Native. Supports Android, iOS, Web and Expo.
Stars: ✭ 442 (-7.53%)
Mutual labels:  shadow
Tiny-OpenGL-Shadow-Mapping-Examples
Compact OpenGL Shadow Mapping Examples in a single compilation unit
Stars: ✭ 21 (-95.61%)
Mutual labels:  shadow
Coloredshadowimageview
ColoredShadowImageView allows you to create a beautiful shadow around the image based on corresponding area colors.
Stars: ✭ 454 (-5.02%)
Mutual labels:  shadow
Shadowview
An iOS Library that makes shadows management easy on UIView.
Stars: ✭ 391 (-18.2%)
Mutual labels:  shadow
shadow
shadow table.
Stars: ✭ 12 (-97.49%)
Mutual labels:  shadow

npm npm github Supports Android and iOS

react-native-neomorph-shadows

Shadows and neumorphism/neomorphism for iOS & Android (like iOS).

See example folder

Shadows Demo Neomorph Demo Neomorph Blur Demo More Demo

Installation

IMPORTANT: this library, starting from v1.0.0, no longer supports expo because React Native Art library was recently deprecated from expo.

Step 1

Run the command below to install the plugin.

npm i react-native-neomorph-shadows

Step 2

You need to install React Native Art in your project.

npm install @react-native-community/art --save

With autolinking (react-native 0.60+)

cd ios && pod install && cd ..

Pre 0.60

react-native link @react-native-community/art

Great! Let's start to use it.

Usage

There are three components: Shadow, Neomorph & NeomorphBlur. Prop style supports most of the view/layout styles.

IMPORTANT: Components dont't support Flex.

If you want flex and auto sizing of Shadow or Neomorph components, use ShadowFlex/NeomorphFlex experimental components, but be careful, these components reduce performance by double rerender. If you know exactly what size(width, height props) it should be, use Shadow/Neomorph components.

Shadow / ShadowFlex

Outer shadow demo Inner shadow demo

import { Shadow } from 'react-native-neomorph-shadows';

...

<Shadow
  inner // <- enable inner shadow
  useArt // <- set this prop to use non-native shadow on ios
  style={{
    shadowOffset: {width: 10, height: 10},
    shadowOpacity: 1,
    shadowColor: "grey",
    shadowRadius: 10,
    borderRadius: 20,
    backgroundColor: 'white',
    width: 100,
    height: 100,
    // ...include most of View/Layout styles
  }}
>
  ...
</Shadow>

Neomorph / NeomorphFlex

Opacity of two shadows automaticly changing and depends of backgroundColor brightness.

Outer neomorph shadow demo Inner neomorph shadow demo

import { Neomorph } from 'react-native-neomorph-shadows';

...

<Neomorph
  inner // <- enable shadow inside of neomorph
  swapShadows // <- change zIndex of each shadow color
  style={{
    shadowRadius: 10,
    borderRadius: 25,
    backgroundColor: '#DDDDDD',
    width: 150,
    height: 150,
  }}
>
  ...
</Neomorph>

Nested Neomorph

Nested neomorph shadow demo

<Neomorph
  style={{
    shadowRadius: 3,
    borderRadius: 100,
    backgroundColor: '#DDDDDD',
    width: 200,
    height: 200,
    justifyContent: 'center',
    alignItems: 'center',
  }}
>
  <Neomorph
    inner
    style={{
      shadowRadius: 7,
      borderRadius: 90,
      backgroundColor: '#F19F9F',
      width: 180,
      height: 180,
      justifyContent: 'center',
      alignItems: 'center',
    }}
  >
    <Neomorph
      style={{
        shadowRadius: 7,
        borderRadius: 50,
        backgroundColor: '#DDDDDD',
        width: 100,
        height: 100,
      }}
    />
  </Neomorph>
</Neomorph>

Custom shadow colors of Neomorph

Custom neomorph shadow demo

<Neomorph
  darkShadowColor="#FF3333" // <- set this
  lightShadowColor="#3344FF" // <- this
  style={{
    shadowOpacity: 0.3, // <- and this or yours opacity
    shadowRadius: 15,
    borderRadius: 50,
    backgroundColor: '#ECF0F3',
    width: 200,
    height: 200,
  }}
/>

Neomorph Blur

Custom neomorph shadow demo

import { NeomorphBlur } from 'react-native-neomorph-shadows';

<NeomorphBlur
  style={{
    shadowRadius: 12,
    borderRadius: 70,
    backgroundColor: '#ECF0F3',
    width: 140,
    height: 140,
  }}
/>;

Animation

import { Animated } from 'react-native';
import { Shadow, Neomorph, NeomorphBlur } from 'react-native-neomorph-shadows';

const AnimatedShadow = Animated.createAnimatedComponent(Shadow);
const AnimatedNeomorph = Animated.createAnimatedComponent(Neomorph);
const AnimatedNeomorphBlur = Animated.createAnimatedComponent(NeomorphBlur);

...

<AnimatedShadow />
<AnimatedNeomorph />
<AnimatedNeomorphBlur />

Props

Shadow/ShadowFlex props

Prop Type Default Description
style object undefined Like View/Layout style prop with a few difference. Flex not available. width & height is required. (None of this is about the ShadowFlex)
useArt bool false If true, the component will use drawable shadow on both platform (iOS, Android)
inner bool false If true, a shadow will be inside of component
children node undefined

Neomorph/NeomorphFlex props

Prop Type Default Description
style object undefined Like View/Layout style prop with a few difference. Flex not available. width & height is required. (None of this is about the NeomorphFlex)
swapShadows bool false If true, the value of zIndex property both shadows will swap
inner bool false If true, shadows will be inside of component
darkShadowColor string 'black' Dark shadow color
lightShadowColor string 'white' Light shadow color
children node undefined
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].