Skip to content
React wrapper for scroller
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
src
.babelrc
.gitignore
.npmignore
README.md
gulpfile.js
package-lock.json
package.json
yarn.lock

README.md

react-scroller

Wrapper for Prokrutchik.

Installation

npm install react-prokrutchik --save

Usage

import React from 'react'
import ReactScroller from 'react-prokrutchik'

class App extends React.Component {
  
  render() {
    const config = {
      scrollbar: 'hidden',
      anchors: 'hidden',
      align: 'center',
      start: 'end',
      startAnimation: true,
      onClick: e => { console.log(e) }
    }

    return <ReactScroller config={config}>
      {['text1', 'text2', 'text3'].map((item, i) => {
        return <div 
          data-central={i == 0 ? "true" : "false"}
          data-anchor={item}
          className="item" 
          key={i} 
        >{item}</div>
      })}
    </ReactScroller>
  }
}

Help

If you have any questions send an email to bespoyasov@me.com.

You can’t perform that action at this time.