An inertia touch scroll React component come up to native scrolling experience and performance.
npm install react-inertia --save
var React = require('react');
var ScrollArea = require('react-inertia');
var App = React.createClass({
render: function() {
return (
<Scrollable
className="area"
contentClassName="content"
horizontal={false}
>
... lots of content here...
</Scrollable>
);
}
});
React.render(<App/>, document.body);
git clone https://github.com/souhe/reactScrollbar.git
cd reactScrollbar
npm install
gulp
then open http://localhost:8003.
<ScrollArea
speed={Number}
className={String}
contentClassName={String}
horizontal={Boolean}
vertical={Boolean}
>
Scroll speed applied to mouse wheel event. Default: 1
CSS class names added to main scroll area component.
CSS class names added to element with scroll area content.
When set to false, horizontal scrollbar will not be available. Default: true
When set to false, vertical scrollbar will not be available, regardless of the content height. Default: true