Skip to content

Repository files navigation

React Native Animated Segmented Control 🚀

Animated segment control for react native.

Demo

Installation

npm install --save react-native-animated-segment-control
yarn add react-native-animated-segment-control

Usage

importSegmentContorlfrom'react-native-animated-segment-control';render(){return(<Viewstyle={styles.mainContainer}><SegmentControlvalues={['Segment1','Segment2','Segment3']}onChange={(currentIndex)=>{}}disable={false}selectedIndex={1}/></View>)}

Properties

PropTypeDescription
disableBooleanEnable / Disable the entire component. Default is false.
valuesArray(String)The labels for the control's segment buttons, in order.
onChangefunctionCallback that is called when the user taps a segment.
selectedIndexNumberIndex of the selected segment.
offsetHeightNumberActive Segment's offset height.
styleStylesStyles props of segment control.
segmentControlStyleStylesStyles props of segment control.
activeSegmentStyleStylesStyles props of active segment view.
selectedTextStyleStylesSelected Segment's text style.
unSelectedTextStyleStylesUnselected Segment's text style.

License

MIT

About

Animated Segment Control for React Native (iOS and Android)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages