1.0.5 • Published 3 years ago

react-native-scrollview-indicator v1.0.5

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

React Native Scrollview Indicator

Extends the native ScrollView from React Native with a custom scrollindicator. That indicator stays visible als long it is activated.

Intention

The native ScrollView does not indicate that there is more content accessable by scrolling the element. Reason is the disapearing indicator by the native element after scrollig. And it is not even visible after rednering the page. So for those who want to show an indicator permanant they can use this package.

Installation

npm install react-native-scrollview-indicator --save

Usage

import { ScrollViewIndicator } from "react-native-scrollview-indicator";

<ScrollViewIndicator
    contentData={this.dataArray}
    customIndicator={true}
    customIndicatorWidth={5}
    customIndicatorColor={'red'}
/>

Properties

Any ScrollView property and the following:

PropDescriptionDefault
contentDataThe content for the ScrollView. Same like before, Array of Views..None
customIndicatorIf true, the custom indicator is visiblefalse
customIndicatorWidthThe width of the indicator.3
customIndicatorColorThe color of the indicator'grey'

Hints

  • At this moment the custom indicator is just for vertical scrolling. In coming updates it will be available for horizontal scrolling as well.

  • The height is determinant automatically by the size of the content and the size of the ScrollView. So no need to think about that.

License

MIT.