React Native Swipe Hidden Header
A react native component that can hide navigator bar when user swipe list.
Example
The demo app from the GIF can be found at ./example
.
To build and run the example app:
git clone https://github.com/fengliu222/react-native-swipe-hidden-header.git cd react-native-swipe-hidden-header/examplesnpm installreact-native run-ios
Installation
Using npm:
$ npm install --save react-native-swipe-hidden-header
Using yarn:
$ yarn add react-native-swipe-hidden-header
USAGE
Use internal scrollView:
{ return <SwipeHiddenHeader = > <View => <Text>This is content</Text> </View> </SwipeHiddenHeader> ; }
Use custom scrollView:
{ return <SwipeHiddenHeader = = /> ; }
Props
Prop | Type | Description |
---|---|---|
children |
ReactElement<any> |
React Element(s) to render. |
header |
() => ReactElement<any> |
Callback that renders a header component |
renderScrollComponent |
?() => ReactElement<any> |
Callback that renders a ScrollComponent. |
startHiddenHeaderOffset |
?number |
When offsetY reach this value, header will start hide. |
headerWrapStyle |
?Object |
The styles of the header wrap element. |
Platform Support
iOS / Android