1.0.1 • Published 4 years ago

react-native-flatlist-header v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

react-native-flatlist-header

SliderBox

Custom FlatlistHeader

Component based 100% on React-Native's own Flatlist

PropsValue TypeDescriptionDefault
navBarNumberSize the Nav bar should be when scrolling up79
heightNumberSize at which the component must occupy when scrolling down150
imageImage path to be usedrequire if image local or {uri: url} from image webnull
imageSizeSets value for image size with end navBarNumber35
marginImageNumberfine adjustments to the image left when scrolling up280
rightItemComponent RNIf you want to insert a component in the right cornernull
colorColor HexadecimalComponent background color#333

Install

npm i react-native-flatlist-header

Usage :

1- add below import in your code :

import { FlatlistHeader } from "react-native-flatlist-header";

2- Define the props according to the documentation above or copy the example below.

<FlatlistHeader
   data={data}
   renderItem={({item}) => <Item item={item} />}
   keyExtractor={item  =>  item.id}
   
   rightItem={<Icon type='Feather' name='bell' />}
   image={require('./src/assets/logo.png')}
   navBar={80}
   height={150}
   color={'#d13636'}
   marginImage={270}
/>