react-native-simple-shadow
v1.0.0
Published
A package that mirrors the implementation of the iOS shadow style props on Android
Downloads
3
Readme
react-native-shadow-view
Getting started
$ yarn add react-native-shadow-view
Usage
Set shadow parameters to the ShadowView just as you use shadows in iOS. it will appear on android same as on iOS.
import React, { Component } from 'react';
import ShadowView from 'react-native-shadow-view'
class MyView extends Component {
render() {
return (
<ShadowView
style={{
width: 100,
height: 100,
shadowColor: 'black',
shadowOpacity: 1,
shadowRadius: 20,
shadowOffset: { width: 0, height: 0 },
backgroundColor: 'rgba(0,255,0,0.5)',
}}
>
... Texts / Views / etc ...
</ShadowView>
);
}
export default MyView;