
Security News
NVD Quietly Sweeps 100K+ CVEs Into a “Deferred” Black Hole
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
react-native-segmented-control-tab
Advanced tools
A react native component with the same concept of react native's SegmantedControlIOS, Primarily built to support both IOS and Android.
A react native component with the same concept of react native's SegmantedControlIOS, Primarily built to support both IOS and Android. 💡
npm install react-native-segmented-control-tab --save
class ConsumerComponent extends Component {
render() {
return (
<View>
<SegmentedControlTab
values={['First', 'Second', 'Third']}
onTabPress= {index => console.log(index))}
/>
</View>)
}
}
Name | Description | Default | Type |
---|---|---|---|
values | titles of tabs | ['One', 'Two', 'Three'] | array |
selectedIndex | index of tab item to be selected initially | 0 | number |
borderRadius | borderRadius of whole tab | 5 | number |
tabsContainerStyle | external styles can be passed to override the default styles of the segmentedControl wrapper | base styles added in SegmentedControlTab.js | object(styles) |
tabStyle | external styles can be passed to override the default styles of the tabs | base styles added in SegmentedControlTab.js | object(styles) |
tabTextStyle | external styles can be passed to override the default styles of the tab title | base styles added in SegmentedControlTab.js | object(styles) |
activeTabStyle | external styles can be passed to override the default styles of the active tab | base styles added in SegmentedControlTab.js | object(styles) |
activeTabTextStyle | external styles can be passed to override the default styles of the active tab text | base styles added in SegmentedControlTab.js | object(styles) |
onTabPress | call-back function for each item | () => {} | func |
<SegmentedControlTab tabsContainerStyle={styles.tabsContainerStyle}
tabStyle={styles.tabStyle}
tabTextStyle={styles.tabTextStyle}
activeTabStyle={styles.activeTabStyle}
activeTabTextStyle={styles.activeTabTextStyle}
selectedIndex={1}
values={['First', 'Second', 'Third']}
onPress= {index => this.setState({selected:index})}
/>
const styles = StyleSheet.create({
tabsContainerStyle: {
//custom styles
},
tabStyle: {
//custom styles
},
tabTextStyle: {
//custom styles
},
activeTabStyle: {
//custom styles
},
activeTabTextStyle: {
//custom styles
},
})
🙏 credits to all the other devs who had built the similar concept, had referred some of the their components on the github, to get a fair idea 💡 to build this.😊 If you have any idea in implementing this further, let me know or you can update it and raise a PR.😊🚀
MIT
FAQs
A react native component with the same concept of react native's SegmantedControlIOS, Primarily built to support both IOS and Android.
We found that react-native-segmented-control-tab demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Research
Security News
Lazarus-linked threat actors expand their npm malware campaign with new RAT loaders, hex obfuscation, and over 5,600 downloads across 11 packages.
Security News
Safari 18.4 adds support for Iterator Helpers and two other TC39 JavaScript features, bringing full cross-browser coverage to key parts of the ECMAScript spec.