One might find it extremely useful to provide active tab style.
Use case example
You can customize style using indicatorStyle in TabBar Component.
It's an implemented feature ๐
https://github.com/react-native-community/react-native-tab-view#tabbar
You can customize style using
indicatorStylein TabBar Component.
It's an implemented feature ๐
https://github.com/react-native-community/react-native-tab-view#tabbar
I dont see how this would help to apply style to active tab background, not to indicator.
Is there a solution to this yet? I'm also having this problem
same, i'm also having this issue. would like to be able to provide a fontWeight to the active tab
Any update?
As a workaround you can set indicator height to the tab width, and add borderBottom styling.
Not the best approach. Probably the issue should be reopened.
const AppTabBar = (props) => (
<TabBar
{...props}
activeColor={Colors.primary700}
pressColor={Colors.primary200}
inactiveColor={Colors.gray3}
indicatorStyle={styles.indicator}
tabStyle={styles.tab}
style={styles.tabBar}
/>
);
const styles = StyleSheet.create({
tabBar: {
backgroundColor: Colors.white,
elevation: 1,
},
indicator: {
backgroundColor: Colors.primary50,
borderBottomColor: Colors.primary500,
borderBottomWidth: 2,
height: 56,
}
});
My solution is to use renderTabBarItem.
active tabbar backgroundcolor different with inactive tabs how to do?
active tabbar backgroundcolor different with inactive tabs how to do?
you can use indicator style to achive it :)
indicatorStyle: {
backgroundColor: '#000',
height: '100%',
borderRadius: 20,
}
thanks
On Tue, Sep 15, 2020 at 1:39 PM Anas T notifications@github.com wrote:
active tabbar backgroundcolor different with inactive tabs how to do?
you can use indicator style to achive it :)
indicatorStyle: { backgroundColor: '#000', height: '100%', borderRadius:
20, }โ
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/satya164/react-native-tab-view/issues/804#issuecomment-692580897,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMNABWBSZ2AZA3PYIXGMKMDSF4VL7ANCNFSM4HYRKM3Q
.
Thanks satya
On Tue 15 Sep, 2020, 7:09 PM Anas T, notifications@github.com wrote:
active tabbar backgroundcolor different with inactive tabs how to do?
you can use indicator style to achive it :)
indicatorStyle: { backgroundColor: '#000', height: '100%', borderRadius:
20, }โ
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/satya164/react-native-tab-view/issues/804#issuecomment-692580897,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABE6HVSK57LEVR6IUEE6ZLTSF4VLZANCNFSM4HYRKM3Q
.
its not rendering background color, this indicator style only works when
you press that tab and once you release it will no more in effect.
On Tue, Sep 15, 2020 at 8:31 PM kamrankm9090 notifications@github.com
wrote:
thanks
On Tue, Sep 15, 2020 at 1:39 PM Anas T notifications@github.com wrote:
active tabbar backgroundcolor different with inactive tabs how to do?
you can use indicator style to achive it :)
indicatorStyle: { backgroundColor: '#000', height: '100%', borderRadius:
20, }โ
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<
https://github.com/satya164/react-native-tab-view/issues/804#issuecomment-692580897
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AMNABWBSZ2AZA3PYIXGMKMDSF4VL7ANCNFSM4HYRKM3Q.
โ
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/satya164/react-native-tab-view/issues/804#issuecomment-692627212,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABE6HVXXI57O6PE7ZTEJZVTSF467NANCNFSM4HYRKM3Q
.
Most helpful comment
I dont see how this would help to apply style to active tab background, not to indicator.