Im currently creating a tab navigator for an app, but everytime I press on one of my <Tab.Screen there is a ripple effect which I want to remove.
<Tab.Navigator
screenOptions={{
headerShown: false,
tabBarStyle: styles.tabBar,
tabBarShowLabel: false,
}}
>
</Tab.Navigator>
Thats my line for the Tab.Navigator
If anyone can help it would be great
I tried using ColorPress: Transparent but it doesn’t seem to exist in screenOptions
I also tried using headerPressOpacity and headerPressColor but they dont work either
Finally I tried tabbarPressColor and it doesnt seem to exist or work either
I just want to remove the ripple effect thats it, I dont want to customize it or anything just remove it.
2
Answers
I think you may have to change the button that is rendered by the navigator, not the navigator options. The ripple effect itself, seen on Android, is usually due to TouchableNativeFeedback which you would want to avoid. Rendering your own touchableOpacity should remove the effect.
https://reactnavigation.org/docs/bottom-tab-navigator/#tabbarbutton
Another solution is similar to Inshal answer but implemented with the Pressable component (It can be useful to avoid Typescript types compatibility):