2.0.2 • Published 2 months ago

react-horizontal-auto-scroll v2.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

NPM version Downloads/month

react-horizontal-auto-scroll

While scrolling through a webpage users often miss any content that is needed to be scrolled horizontally. With this React component one can overcome this issue easily both on desktops and mobile.

Install

npm install --save react-horizontal-auto-scroll

Usage

import React from 'react';
import  Scroller  from  'react-horizontal-auto-scroll';

  

function  App() {
	
	return (
	<div  className="App">
		//Content
		//.............
		// More content
		<Scroller className="row">
			<Col>CONTENT</Col>
			<Col>CONTENT</Col>
			<Col>CONTENT</Col>
			<Col>CONTENT</Col>
			<Col>CONTENT</Col>
			<Col>CONTENT</Col>
			<Col>CONTENT</Col>
		</Scroller>
		//Content
		//.............
		// More content
	</div>
	);
}

Here is a list of all props that Scroller accepts :

NameRequiredTypeDefaultDescription
scrollSpeedfalseNumberScroll speed depends on number ranging from 1-10
isSlideShowfalseBooleanWhen set to true the horizontal scrolling will work kind of like a slideshow
reversefalseBooleanWhen set to true horizontal reverse scrolling will trigger while scrolling up
childrenfalseReactNodeA number of child elements need to passed for it to work

You can pass all html props to Scroller.

2.0.2

2 months ago

2.0.1

2 months ago

2.0.0

2 months ago

1.1.1

2 months ago

1.1.0

2 months ago