Hi! I am transitioning from React Navigation/Material Top Tabs to this library for obvious reasons. I stylized a dynamic indicator, which adjusts the width according to the tab item.
I've been trying to achieve the same using this library but the tab indicator does not change its width according to tab item & if hardcoded it does not stays under the tab item for tab indexes > 0.
Here's my styling for MaterialTabBar:
{showLabel: true, activeColor: '#42C2AB', inactiveColor: 'slategray', style: { elevation: 0, borderBottomWidth: 1, borderColor: '#42C2AB', backgroundColor: 'transparent', width: 'auto', }, labelStyle: { textTransform: 'capitalize', fontSize: 14, }, indicatorStyle: { backgroundColor: '#42C2AB', height: 2, alignSelf: 'flex-start', width: '20%', }, tabStyle: { alignSelf: 'flex-start', justifyContent: 'flex-start', flexDirection: 'row', width: 'auto', padding: 0, // backgroundColor: 'green', marginRight: 18, }, contentContainerStyle: { justifyContent: 'flex-start', flexDirection: 'row', width: 'auto', }, }
Hi! I am transitioning from React Navigation/Material Top Tabs to this library for obvious reasons. I stylized a dynamic indicator, which adjusts the width according to the tab item.
https://user-images.githubusercontent.com/29996189/147616557-06acd58d-bba0-4328-9ee0-aacb9200a2d4.mp4
I've been trying to achieve the same using this library but the tab indicator does not change its width according to tab item & if hardcoded it does not stays under the tab item for tab indexes > 0. Here's my styling for MaterialTabBar:
{showLabel: true, activeColor: '#42C2AB', inactiveColor: 'slategray', style: { elevation: 0, borderBottomWidth: 1, borderColor: '#42C2AB', backgroundColor: 'transparent', width: 'auto', }, labelStyle: { textTransform: 'capitalize', fontSize: 14, }, indicatorStyle: { backgroundColor: '#42C2AB', height: 2, alignSelf: 'flex-start', width: '20%', }, tabStyle: { alignSelf: 'flex-start', justifyContent: 'flex-start', flexDirection: 'row', width: 'auto', padding: 0, // backgroundColor: 'green', marginRight: 18, }, contentContainerStyle: { justifyContent: 'flex-start', flexDirection: 'row', width: 'auto', }, }