react-indiana-drag-scroll-temp-package
Implements scroll on drag
Last updated a year ago by entozoon .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-indiana-drag-scroll-temp-package 
SYNC missed versions from official npm registry.

React Indiana Drag Scroll

Implements scroll on drag

NPM JavaScript Style Guide

Try it yourself! Go to demo website.

Install

npm install --save react-indiana-drag-scroll
yarn add react-indiana-drag-scroll

Usage

import React, { Component } from 'react'

import ScrollContainer from 'react-indiana-drag-scroll'

class Example extends Component {
  render () {
    return (
      <ScrollContainer className="scroll-container">
        { ... }
      </ScrollContainer>
    )
  }
}

Component properties

Prop Type Description Default
vertical Bool Allow vertical drag scrolling true
horizontal Bool Allow horizontal drag scrolling true
hideScrollbars Bool Hide the scrollbars true
activationDistance Number The distance that distinguish click and drag start 10
children Node The content of scrolling container
onScroll Function Invoked when user scrolling container
onEndScroll Function Invoked when user ends scrolling container
onStartScroll Function Invoked when user starts scrolling container
className String The custom classname for container
style Number The custom styles for container
ignoreElements String Elements within that should not trigger the scrolling behaviour, such as ".modal, dialog"

License

The source code is licensed under MIT, all images (except hieroglyphs) are copyrighted to their respective owner © Norserium

Current Tags

  • 1.1.0                                ...           latest (a year ago)

1 Versions

  • 1.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |