Skip to content

Custom ScrollView component which supports custom scroll indicator

Notifications You must be signed in to change notification settings

podCloud/react-native-scroll-indicator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  1. Install the package
    npm i -S podcloud/react-native-scroll-indicator
    or
    yarn add podcloud/react-native-scroll-indicator

  2. Add an import to the top of your file

    import ScrollViewIndicator from "react-native-scroll-indicator";
  3. 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
showDuration num Duration before hiding indicator in ms 1200
useTimer bool Use timer based detection for scroll show/hide animation false
style style Style of container {}
scrollViewStyle style Style of ScrollView component {}
scrollIndicatorContainerStyle style Style of scroll indicator container {}
scrollIndicatorStyle style Style on scroll indicator {}
...ScrollViewProps ScrollViewProps All other props will be passed to ScrollView {}

About

Custom ScrollView component which supports custom scroll indicator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%