react-native-scroll-indicator
v0.1.0
Published
This package will help you to create your awesome custom scroll indicator
Downloads
3,607
Maintainers
Readme
react-native-scroll-indicator
It's a simple react-native component made to help you to create your awesome custom scroll indicators. It's support only ScrollView for now. But in the next version it should support FlatList.
Usage
Install the repository
npm i react-native-scroll-indicator
oryarn add react-native-scroll-indicator
Add an import to the top of your file
import ScrollViewIndicator from 'react-native-scroll-indicator';
Use it just as normal ScrollView but with some custom props.
<ScrollViewIndicator> <Content /> </ScrollViewIndicator>
Component Props
| Props | Type | Description | Default |
|----------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| flexibleIndicator | bool | Set to false
if you want to set your indicator a fixed height | true |
| indicatorHeight | num | Height of indicator. Use with flexibleIndicator
| 200 |
| shouldIndicatorHide | bool | Set to true
if you want to hide Indicator when scroll is idle | true
| hideTimeout | num | Time of show/hide indicator animation in ms
| 500 |
| style | style | Style of container | {} |
| scrollViewStyle | style | Style of ScrollView component | {} |
| scrollIndicatorContainerStyle | style | Style of scroll indicator container | {} |
| scrollIndicatorStyle | style | Style on scroll indicator | {} |