Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove tab navigator's bottom border (react-navigation)

In react navigation v5, when implementing a materialTopTabNavigator, how can I remove the bottom horizontal border separating the tab menu and individual tab pages?

I've tried borderWidth, borderBottomWidth, borderTopWidth in tabBarOptions.style to no avail.

like image 616
Aaron Avatar asked Mar 27 '20 15:03

Aaron


People also ask

How do I hide the header in react navigation to the bottom tab?

(React Nav ver6. x) add this code snipet "options={{headerShown: false}}" in "<Tab. Screen />". It will delete header of each tab you add into.

How do I customize the tab bar in react navigation?

Add icons to the tab bar To add icons to each tab, first import the Icon component from react-native-vector-icons library inside the navigation/TabNavigator/index. js file. For this example, let's use AntDesign based icons. // after other import statements import Icon from 'react-native-vector-icons/AntDesign';

How do I remove the bottom line from the header in react native?

At times, the UI of the screen might not require a header border or shadow at all. In such cases, you can always customize the screenOptions by adding the property headerShadowVisible and setting it to false .


1 Answers

screenOptions={{
     tabBarStyle: {
              borderTopWidth: 0
        }
    }
like image 105
Zanyar J.Ahmed Avatar answered Sep 28 '22 06:09

Zanyar J.Ahmed