DEV Community

Pragati20
Pragati20

Posted on

Change navbar color react native

How to change navigation bar color(Bottom three soft buttons) on android in react native.

react-native-navigation-bar-color - This library is not working for me.

Top comments (6)

Collapse
 
erkangozukucuk profile image
erkangozukucuk

What is your navigation library?

Collapse
 
pragati20 profile image
Pragati20

simple react-navigation(v3) i have used

Collapse
 
erkangozukucuk profile image
erkangozukucuk • Edited

According to api reference reactnavigation.org/docs/3.x/stack... you can use headerStyle property of navigationOptions

Thread Thread
 
pragati20 profile image
Pragati20

headerStyle is to make changes in header of the screen, i need to change bottom soft three buttons background color(nav bar)

Thread Thread
 
erkangozukucuk profile image
erkangozukucuk

Can you share code?

Thread Thread
 
pragati20 profile image
Pragati20

Yeah sure, sorry i was inactive.

export const MainNavWithOnBoarding = createStackNavigator(
{
[routes.OnBoardingNav]: {
screen: OnBoardingNav,
navigationOptions: {
gesturesEnabled: false,
},
},
[routes.Drawer]: {
screen: DrawerNavigator,
navigationOptions: {
gesturesEnabled: false,
},
},
},
{
headerMode: 'none',
},
);