Git Product home page Git Product logo

rn-faded-scrollview's Introduction

rn-faded-scrollview

A simple and customisable React Native component that allows you to add fade effect in ScrollView at both ends.

Vertical Scroll Horizontal Scroll

Sponsor

Buy Me A Coffee

Installation

This library relies on react-native-linear-gradient. Follow setup instructions of linear gradient.

And now finally run in your project directory.

npm install rn-faded-scrollview

OR

yarn add rn-faded-scrollview

Documentation

This library accepts all the props of ScrollView and some additional props.

Props

Name Description Default Type
allowStartFade Add fade at the start of ScrollView false Boolean
allowEndFade Add fade at the end of ScrollView true Boolean
fadeSize Fade size i.e( width incase of horizontal and height incase of vertical ScrollView) 20 Number
fadeColors Colors for fade effect ['rgba(229, 229, 229, 0.18)', 'rgba(206, 201, 201, 0.6)', 'rgba(206, 201, 201, 0.9)'] Array
scrollThreshold Threshold to control fade hide/show when it reaches start or end 10 Number
scrollEventThrottle This controls how often the scroll event will be fired while scrolling (as a time interval in ms) 16 Number
allowDivider Allow divider at fade end. false Boolean
isRtl For RTL Layouts false Boolean
onContentSizeChange onContentSizeChange call back added, function will return contentWidth and contentHeight Function

Styling

For styling pass these props.

containerStyle, startFadeStyle, endFadeStyle and dividerStyle.

Events

Name Callback param Description
isCloseToEnd Boolean if scroll is close to end or not.
isCloseToStart Boolean if scroll is close to start or not.

rn-faded-scrollview's People

Contributors

appfr3d avatar mak12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.