1.0.6 • Published 2 years ago

react-native-scroll-up-container v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React Native Scroll Up

React native scroll up container is a react native component with scroll up animation, you will see an example below.

Default

With Children

Installation

Before you install this package, this package requires react-native-gesture-handler and react-native-reanimated packages.

  npm i react-native-gesture-handler react-native-reanimated

After that you can install this package.

  npm i react-native-scroll-up-container

Usage/Examples

import React from 'react'
import { View } from 'react-native'
import SwipeContainer from 'react-native-scroll-up-container'

function App() {
  return <SwipeContainer 
    useLine
    containerStyle={{
      flex:1
    }}
    translateY={300}
    overValue={50}
    topComponent={
      <View style={{
        flex:1,
        backgroundColor:'blue'
      }}>
      </View>
    }
    limitTopValue={50}
    limitBottomValue={250}
  >
    <View style={{
      height:800,
      width:'100%',
      backgroundColor:'red
    }}>
    </View>
  </SwipeContainer>
}

Props

PropTypeDescription
useLineBooleanOptional, Default: True. Use default line for bottom component
containerStyleObjectOptional. For customize container style
translateYNumberOptional, Default: 300. Position translateY of bottom component
overValueNumberOptional, Default: 50. Over height value for top component
limitTopValueNumberOptional, Default: 50. Limit top value for animate spring
limitBottomValueNumberOptional, Default: 250. Limit bottom value for animate spring
topComponentComponentFor customize top component of container
childrenComponentFor customize children of container

Contributing

License

MIT

Authors