'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.



Solution 1:[1]

screenOptions={{
     tabBarStyle: {
              borderTopWidth: 0
        }
    }

Solution 2:[2]

<Tab.Navigator
  tabBarOptions={{
    activeTintColor: "#fff",
    inactiveTintColor: "#fff",
    activeBackgroundColor: "#090D20",
    inactiveBackgroundColor: "#192665",
    style: {
      backgroundColor: "#192665",
      height: 60,
      borderTopColor: "red", //Change Like This
    },
  }}
>
  <Tab.Screen name="Home" component={Home} />
  <Tab.Screen name="ContactsScreen" component={ContactsScreen} />
</Tab.Navigator>[enter image description here][1]

Solution 3:[3]

tabBarOptions: { style: { // Remove border top on both android & ios borderTopWidth: 0, borderTopColor: "transparent",

        elevation: 0,
        shadowColor : '#5bc4ff',
        shadowOpacity: 0,
        shadowOffset: {
          height: 0,
        },
        shadowRadius: 0,

} }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zanyar J.Ahmed
Solution 2 Sumit
Solution 3 Sambulo Senda