1.0.7 • Published 3 years ago

react-native-elevate v1.0.7

Weekly downloads
25
License
MIT
Repository
github
Last release
3 years ago

react-native-elevate

A Material Design shadow generator which provides similar results on both Android & iOS. Note: Keyword here is similar as on Android the position of the element will determine the size and opacity of the drop shadow. Inspired by:

Installation

Install the package using Yarn:

yarn add react-native-elevate

or npm:

npm install --save react-native-elevate

Usage

Import the function:

import { elevate } from "react-native-elevation"

Use it in a StyleSheet:

const styles = StyleSheet.create({
	container: {
		...elevate(4)
	}
})

Use it in your component:

<View style={[styles.wrapper, elevate(2)]}>
	...
</View>

Example