0.1.12 • Published 9 years ago

react-kinetic-scrolling v0.1.12

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

React Kinetic Scrolling

Attention! Active development in progress

React component which handle scrolling by mouse drag and wheel, with kinetic effect (like in mobile interfaces).

Features:

  • vertical and horizontal scrolling
  • snap to grid feature
  • mouse wheel scrolling

##Properties:

PropertyTypeDescription
childrenarray, stringAccepts simple text or array of elements.
snapnumberDetermines width of grid cell and enables "snap to grid" feature.
horizontalboolVertical scrolling enabled by default. Set this property to make scrolling horizontally.
classNamestringAdding custom styling for root div of the component
trackPositionfuncCallback for tracking when Scrolling at edge positions and if it is dragging (need for disabling click handlers on items).

##Methods:

scrollToItem(idx) --- Scrolls to item of passed index. Returns false if snap feature disabled.

atBegin() --- Returns true if scrolling at the beginning (offset = 0).

atEnd() --- Returns true if scrolling at the end (offset = max).

next() --- Scrolls to next item if snapping enabled.

prev() --- Scrolls to previous item if snapping enabled.

current() --- Returns index of item to which component currently scrolled.

Inspired by and uses https://github.com/ariya/kinetic/ for kinetic effect calculations.

0.1.12

9 years ago

0.1.11

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago