How can I change drawerActiveBackgroundColor in React Navigation 6?

Viewed 338

How can I change drawerActiveBackgroundColor in React Navigation 6 here is my code:

<Drawer.Navigator
      screenOptions={{
        drawerActiveBackgroundColor: "red",
      }}
      drawerContent={props => <DrawerContent {...props} />}>
      <Drawer.Screen
        options={{
          drawerStyle: {
            backgroundColor: '#c6cbef',
            width: 240,
          },
        }}
        name="Login"
        component={Login}
        options={{headerShown: false}}
      />
      <Drawer.Screen
        name="SignUp"
        component={SignUp}
        options={{headerShown: false}}
      />
    </Drawer.Navigator>
1 Answers

Please use

activeTintColor: Color for the icon and label when the item is active.

inactiveTintColor: Color for the icon and label when the item is inactive.

activeBackgroundColor: Background color for item when it's active.

inactiveBackgroundColor: Background color for item when it's inactive.

Related