Danks
Danks

Reputation: 113

How to change height of react-navigation header

On attempt to stylize the header still can't change the height that is on the header

Even using

static navigationOptions = ({navigation}) => ({
    title: 'Title',
    headerStyle: {height: 60}
  })

enter image description here

Upvotes: 1

Views: 6599

Answers (1)

Joao Polo
Joao Polo

Reputation: 2163

I prefer to remove entirely the header, and then I used a header from react-native-elements:

createStackNavigator(screens, { headerMode: 'none' })

And then, the Header

import { Header } from 'react-native-elements';

<Header...>

That component consider the top status bar size, and do all things automatically, and run on Expo and ejected apps

Upvotes: 3

Related Questions