I'm using createBottomTabNavigator and instead of coloring the whole tab or icon when a tab is active I only want to change the borderTopColor. Is this possible somehow?
Asked
Active
Viewed 163 times
2
-
Maybe you should create you own `tabBarComponent` it will allow you to manipulate your bottom bar the way you want – Salim Jun 30 '20 at 12:57
-
I was thinking that if I had access to focused it would be as easy as ``` tabStyle: { borderTopColor: focused ? "red" : "white" } ``` Or if I could overwrite it in each screen and there set it to red and otherwise use default white. – fuzz Jun 30 '20 at 13:05
-
@fuzz Did you get any solution for your above question? I am looking for a solution to use bottom tab active indicator with react navigation v5. – Padmini S Apr 21 '21 at 10:06
-
@PadminiS No, I ended up using a hacky solution by including a border inside the button instead. – fuzz Apr 22 '21 at 06:30
-
@fuzz Thanks for your response. Something similar I am also planning , don't think currently it's going to work without a hack. Please post an answer if you'll find some clean solution in future. – Padmini S Apr 22 '21 at 08:39