Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the header of Drawer navigator - React native

I'm using drawer navigator to create a menu by react native I want to remove the header and keep just the bar icon so I tried to turn the backgroundColor into transparent but it doesnt work.

the code is bellow:

<Drawer.Navigator      
  drawerContent={props => <DrawerContent {...props} />}>
    <Drawer.Screen
      name="Home"
      component={HomeScreen}
      options={{
        headerStyle: {
          backgroundColor: 'transparent',
        },
      }}
    />

enter image description here

like image 953
Keltouma Indtaher Avatar asked Nov 19 '25 04:11

Keltouma Indtaher


1 Answers

I solved this by adding screenOption to the Drawer.navigator

screenOptions={{
  headerShown: true,
  headerTransparent:true
}}
like image 116
Keltouma Indtaher Avatar answered Nov 20 '25 17:11

Keltouma Indtaher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!