Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DrawerNavigator: Change Background Color

On react-navigation's DrawerNavigator, is there a way to change the background color?

By default, the color scheme looks like the following: react-navigation color

Which is initialized by the following:

export const Drawer = DrawerNavigator({
    dOne: {
      screen: Screen1,
    },
    dTwo: {
      screen: Screen2,
    }
  }
);
like image 606
Jake Chasan Avatar asked Dec 05 '25 08:12

Jake Chasan


1 Answers

<Drawer.Navigator
      screenOptions={{
        drawerStyle: {
          backgroundColor: '#c6cbef',
          width: 240,
        },
      }}
    >
      {/* screens */}
    </Drawer.Navigator>

You can check https://reactnavigation.org/docs/screen-options/

like image 194
Farid Avatar answered Dec 07 '25 05:12

Farid