How to show tabBarBadge in material top navigator

Author: gayathrithedevCreated Aug 19, 2020Updated Sep 13, 2026
Labelsbugpackage:material-top-tabsfeature-request

Current Behavior

  • I am using the material top tab navigator
const TobTab = createMaterialTopNavigator();
const TopTabNav = ({ route }) => {
  const {
     notifications
    } = route.params;
  return (
    <NetworkContext.Provider value={route.params}>
      <TopTab.Navigator>
        <TopTab.Screen
          name="Home"
          component={Home}
        />
        <TopTab.Screen
          name="Settings"
          component={Settings}
          options={{
            tabBarBadge: notifications.length,
          }}
        />
      </TopTab.Navigator>
    </NetworkContext.Provider>
  );
};
  • In the material bottom tab navigator, there is a property called tabBarBadge. So that it is very easy to show the badge/notification count.
  • But in material top navigator when I apply the same thing... it is not showing the badge count as expected

Expected Behavior

  • tabBarBadge property should be added to the material top navigator so that it will be very easy to show the badge counts
  • Or what is the way to show badge count in material top navigator ?

How to reproduce

Example project code

Your Environment

software version
@react-navigation/native ^5.7.3
@react-navigation/material-top-tabs ^5.2.16
react-native-tab-view ^2.15.1

Source: react-navigation/react-navigation