react-native-collapsible-accordion
How To Use
yarn add react-native-collapsible-accordion
or
npm install react-native-collapsible-accordion
What you get
- Pure Javascript
- keeps your code clearner
- build with hooks api
- customize your header and content as per your own requirement
- listner for expension state change i.e onChangeVisibility
Example Code
;;;; const App = { const showMoreInfo setShowMoreInfo = ; return <View style=stylescontainer> <Accordion onChangeVisibility= { } renderHeader= <View style=styleswrapDropDownHeader> <Text style=stylesmoreInfoText>More </Text> <AntDesign style=stylesdropIcon name=!showMoreInfo ? 'down' : 'up' /> </View> renderContent= <View style= marginHorizontal: 15 backgroundColor: '#eee' > <Text style= marginVertical: 30 >Optional content</Text> </View> /> </View> ;} ; const styles = StyleSheet;
GitHub https://github.com/shubhamdeol
Development
Want to contribute? Great!
- send me pull request