Skip to content

Custom ScrollView and FlatList components which will render a gradient at the bottom as long as there is scrollable content

License

Notifications You must be signed in to change notification settings

phanghos/react-native-gradient-list

Repository files navigation

react-native-gradient-list

Custom ScrollView and FlatList components which will render a gradient at the bottom as long as there is scrollable content

Installation

Using npm

npm i react-native-gradient-list

This package depends on react-native-reanimated (>=2) and react-native-linear-gradient, so you will need to install both of them

npm i react-native-reanimated react-native-linear-gradient

Make sure to follow the installation instructions for Reanimated

Usage

Both GradienScrollView and GradientFlatList behave exactly as their built-in RN counterparts, so they accept ScrollViewProps and FlatListProps, respectively, plus a few custom props.

<GradientScrollView>
  <View>
    <Text>{...}</Text>
  </View>
</GradientScrollView>

Props

Prop Description
gradientColor Gradient color. It needs to be in HEX format i.e. #ff0000
gradientOffset Gradient offset from the bottom

About

Custom ScrollView and FlatList components which will render a gradient at the bottom as long as there is scrollable content

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published