react-native-elevate
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

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

android-elevationiphone-elevation

Package Sidebar

Install

npm i react-native-elevate

Weekly Downloads

54

Version

1.0.7

License

MIT

Unpacked Size

5.61 kB

Total Files

7

Last publish

Collaborators

  • mattiasmansson