Skip to content

vikjovanov/react-native-waterfall-layout-list

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-waterfall-layout-list

waterfall-layout-list. based in react native VirtualizedList

Setup

This library is available on npm or yarn, install it with: npm i react-native-waterfall-layout-list or yarn add react-native-waterfall-layout-list.

Usage

This is a convenience wrapper around , and thus inherits its props (as well as those of <ScrollView>)

  1. Import react-native-waterfall-layout-list:
import WaterfallList from 'react-native-waterfall-layout-list';

Example

<WaterFallList
        renderItem={renderItem}
        data={data}
        windowSize={5}
        keyExtractor={(item, index) => `${index}`}
        onEndReached={loadMoreData}
        ListFooterComponent={<ListFooter />}
        numColumns={2}
        getHeight={getHeight}
      />

For a more complex example take a look at the /Example directory.

Available props

Name Type Default Description
getItemHieght (item,index)=>number get list-item height animation
numColumns number 1 like Flatlist props but waterfall(masonry) layouts are no supported

Pull requests, feedbacks and suggestions are welcome!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 60.9%
  • Java 18.9%
  • Objective-C 13.4%
  • JavaScript 2.7%
  • Ruby 2.3%
  • Starlark 1.8%