1.0.3 • Published 3 years ago

react-native-panning-scrollview v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

react-native-panning-scrollview

CircleCI Test Coverage Maintainability David npm license

A ScrollView component that moves along with the header section, and only scrolls after the header has been pushed up

npm.io

Props

proptypedescription
childrenReactNode | ReactNodeArrayThe scrollview content
headerImageImageSourcePropTypeOptional. The header image. Defaults to a white background view if not supplied.
badgeImageImageSourcePropTypeOptional. The badge image. The component will automatically apply border radius and enforce a size.
translateRationumberOptional. Affect the rate that the header translates. Higher values = shorter translate distance. Defaults to 3. Recommended 1 - 5
useNativeDriverbooleanOptional. Control whether to use nativeDriver. For compatibility. Defaults to true
backgroundColorColorValueOptional. Change the color of the scrollview container.

How it works

This component uses a scrollview and some Animated trickery to create the illusion of a scrollview that only scrolls after the header has been panned upwards.

Demo

  1. Clone this repo
  2. cd demo
  3. yarn
  4. yarn android or yarn ios