react-native-elevated-view
Tired 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 <View>
components on Android, I've made <ElevatedView>
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.
Configuration
npm install react-native-elevated-view --save
import ElevatedView from 'react-native-elevated-view'
Demo
Basic usage
<ElevatedView elevation=2 />
Example
;; Component { return <View style=stylescontainer> <ElevatedView elevation=3 style=stylesstayElevated /> </View> ; } var styles = StyleSheet;
Props
elevation
(Integer) - Must be between 0 and 24. The elevation you would like the elevated view to appear at.
Contribution
Issues and Pull requests are welcome!