Cross platform solution to elevation for React Native
npm install react-native-elevated-viewTired of split pathing your elevation code? This is the package for you! react-native-elevated-view is a cross platform elevation component for iOS ___and___ Android. Since react native only officially supports the elevation prop for components on Android, I've made to support iOS as well. Elevation docs from google can be found here: https://material.google.com/material-design/elevation-shadows.html#elevation-shadows-object-relationships.
1. npm install react-native-elevated-view --save
2. import ElevatedView from 'react-native-elevated-view'


javascript
`Example
`javascript
import React from 'react';
import { View, StyleSheet } from 'react-native';
import ElevatedView from 'react-native-elevated-view'class App extends React.Component {
render() {
return (
elevation={3}
style={styles.stayElevated}
/>
);
}
}
var styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#e2e1e0'
},
stayElevated: {
width: 100,
height: 100,
margin: 10,
backgroundColor: 'white'
}
});
`Props
-
elevation` _(Integer)_ - Must be between 0 and 24. The elevation you would like the elevated view to appear at.---