Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I hide the shadow under react-navigation headers?

How do I hide the shadow under react-navigation headers?
They look like this.
enter image description here

like image 377
GollyJer Avatar asked Mar 10 '17 03:03

GollyJer


People also ask

How do I remove the bottom line from the header in React Native?

Pass the headerShadowVisible: false to navigation. setOptions({}).


1 Answers

Add the following to the navigationOptions header style.

const AppNavigation = StackNavigator(   {     'The First Screen!': { screen: FirstScreen },   },   {     navigationOptions: {       header: {         style: {           elevation: 0, // remove shadow on Android           shadowOpacity: 0, // remove shadow on iOS         },       },     },   }, ); 

The documentation isn't great yet, but you can learn about navigationOptions in the React Navigation Docs.

like image 72
GollyJer Avatar answered Sep 23 '22 08:09

GollyJer