react-native-segmented-control-tab
react-native-segmented-control-tab copied to clipboard
Ability to scroll tabs while tabs count is greater then 10
Please suggest to me how to make tabs scrollable, In my case tab count is greater than 10.
I have a similar question
Yes please, can we have this? A scrollable option
Yes please make it as a prop. it will be very helpful
Thank you, PR appreciated
I figured it out by wrapping tabs into horizontal ScrollView. Hope it helps you guys.
<ScrollView
showsVerticalScrollIndicator={false}
showsHorizontalScrollIndicator={false}
nestedScrollEnabled={false}
horizontal
>
<SegmentedControlTab
values={['First', 'Second', 'Third', 'Four', 'Five', 'Six']}
selectedIndex={selectedIndex}
onTabPress={setSelectedIndex}
tabStyle={styles.tabStyle}
/>
</ScrollView>
const styles = StyleSheet.create({
tabStyle: {
width: 100,
},
});