The (Parallax) ScrollView component we all deserve. :rocket:
Demo
Installation
Install the package using yarn or npm:
yarn add react-native-scroll-view
or npm i react-native-scroll-view
Usage
import ParallaxScrollView from 'react-native-scroll-view';
<ParallaxScrollView />
API
prop | default | type | description |
---|
coming soon | none | function | coming soon |
Try it out
You can try it out with Exponent here.
Example
Look at the example
folder to run the expo app locally.
Motivation
There are a couple packages that provide a similar parallax scroll view component (here and here) although both of them are not maintained.
I really liked react-native-parallax-view but here are a couple reasons I didn't use it in my app:
- It was not maintained hence I knew submitting an issue on it would go nowhere
- It didn't have a Sticky NavBar when scrolling (similar to Spotify/ ReactConf'17 app)
So I set out to create a Parallax ScrollView component (using react-native-parallax-view as a base) with
- Sticky NavBar Header :tada:
- An awesome default component that just works out of the box (
<ParallaxScrollView />
) - Flexible and comprehensive API to build your own custom use case on it
aka it's a (Parallax) ScrollView component for React Native that we truly deserve :rocket:
Feedback
This repo is being actively manitained. Feel free to open a new Issue with a Feature Request
or submit a PR with an Enhancement
.