Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create inset shadow for a View in react-native - iOS, Android?

Is there a way to create a inset shadow for a view in react native ?

like image 982
Dhananjay Puglia Avatar asked Nov 07 '22 15:11

Dhananjay Puglia


1 Answers

Try this one:

const styles = StyleSheet.create({
containerStyle: {
  borderWidth: 1,
  borderRadius: 2,
  borderColor: '#ddd',
  borderBottomWidth: 0,
  shadowColor: '#000',
  shadowOffset: { width: 0, height: 2 },
  shadowOpacity: 0.8,
  shadowRadius: 2,
  elevation: 1,
  marginLeft: 5,
  marginRight: 5,
  marginTop: 10,
}
})
like image 133
Balasubramanian Avatar answered Nov 15 '22 14:11

Balasubramanian