A React Native FlatList with a lightweight animation which fade and shrink the head item of list when scrolling. Works on iOS & Android.
npm install react-native-vega-scroll-list --save
Import VegaScrollList component:
import VegaScrollList from 'react-native-vega-scroll-list';
Usage:
This usage is similar with FlatList. VegaScrollList accepts FlatList props.
<VegaScrollList
distanceBetweenItem={12} // Add distance between item. Need to calculate animated
data={data}
keyExtractor={this.keyExtractor}
renderItem={this.renderItem}
</VegaScrollList>
VegaScrollList accepts FlatList props. Only need to add distanceBetweenItem
to calculate animation.
prop | type/valid values | default | description |
---|---|---|---|
distanceBetweenItem | number | 8 | distance between item. Needed to calculate the animation |
This repository contains a demo React Native application with a customizable example of the VegaScrollList
component in use.
To use the demo application:
https://github.com/iqbalansyor/react-native-vega-scroll-list.git
cd path/to/this/repository/react-native-vega-scroll-list/Example
npm install
cd ios && pod install && cd ..
npm run start
|| react-native run-android
|| react-native run-ios
Feel free to try it out. Please submit a pull request with any features/fixes for the project.
Author: iqbalansyor
Live Demo: https://www.npmjs.com/package/react-native-vega-scroll-list
GitHub: https://github.com/iqbalansyor/react-native-vega-scroll-list
#react-native #react #mobile-apps