Skip to content

Latest commit

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

npm version

react-native-inset-shadow

Inset shadows for react native components

Setup

This library is available on npm, install it with: npm i react-native-inset-shadow or yarn add react-native-inset-shadow

Usage

importInsetShadowfrom'react-native-inset-shadow'import{Text,View}from'react-native'constViewWithInsetShadow=()=>{return(<Viewstyle={{height: 150}}><InsetShadow><Viewstyle={{flex: 1,justifyContent: 'center',alignSelf: 'center'}}><Text>This view has an inset shadow!</Text></View></InsetShadow></View>)}

Props

NameTypeDefaultDescription
childrennodenull(Required) child components to sit inside the view
leftbooltrue(Optional) show left inset shadow?
topbooltrue(Optional) show top inset shadow?
rightbooltrue(Optional) show right inset shadow?
bottombooltrue(Optional) show bottom inset shadow?
shadowColorstringblack(Optional) shadow color
shadowOffsetnumber1(Optional) how much to offset the shadow on the horizontal/vertical axis
shadowOpacitynumber0.5(Optional) shadow opacity
shadowRadiusnumber3(Optional) shadow radius
elevationnumber5(Optional) shadow elevation for android

Roadmap

  • Add linter

About

Inset shadows for react native components

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages