Skip to content

react-styless/scrollable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-styless/scrollable

You can make your horizontal scroll box scrollable by mouse dragging.

Installation

// with npm
$ npm install @react-styless/scrollable --save

Usage

This is the basic usage of scrollable

import Scrollable from '@react-styless/scrollable';
const App = () => {
  return (
    <Scrollable>
      <div style={{width: 400, overflow: 'auto'}}>
        <div style={{width: 800, background: 'red'}}>child</div>
      </div>
    </Scrollable>
  );
}
Attribute Type Description
children ReactNode
vertical boolean, undefined

About

It makes an element Scrollable by mouse dragging.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published