Giter VIP home page Giter VIP logo

react-flick-list's Introduction

react-flick-list

react bindings for kinetic scrolling

This library implements native like scrolling inertia / momentum entirely in JavaScript. It's useful if you have an absolutely positioned element and need to animate/transform it in a way that feels natural. I couldn't have done it without this article


Install

$ npm install react-flick-list --save

Usage

import FlickList from 'react-flick-list'

..

render () {
  return (
    <FlickList>
      {({ position }) => (
        <List componentStyle={{transform: `translateY(-${position}px)`}}/>
      )}
    </FlickList>
  )
}

preview

API

Param Type functionality required
direction String ('y', 'x') tell the library to calculate sizes based on height or width of element false
max Number maxiumum amount to allow library to scroll false
min Number minimum amount to allow library to scroll false
allowScroll Boolean useful for programmatically disallowing scrolling false
className String add custom class to wrapper element false
getRef Function Add a reference to the list element false
ignoreLimits Boolean Ignore min/max limitations when set to true (default is false) false
getRef Function Add a reference to the list element false
onStart Function Method called when scroll is started false
onScrolling Function Method is called while element is scrolling false
onStop Function Method is called when scroll has stopped false
style Object add custom style object to the div element false

License

MIT © Jack Hanford

react-flick-list's People

Contributors

hanford avatar rosemarystanley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rosemarystanley

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.