Skip to content

ibitcy/react-custom-scrollbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-custom-scrollbar

Custom vertical scrollbar

How to install

npm i react-custom-scrollbar --save

How to import

For TypeScript usage there is a index.d.ts in node_modules folder

import {CustomScrollBar} from 'react-custom-scrollbar';

or

var CustomScrollBar = require('react-custom-scrollbar');

Also use css in a lib folder in:

node_modules/react-video-seek-slider/lib/react-custom-scrollbar.css

How to use

    <CustomScrollBar
        allowOuterScroll={false}
        heightRelativeToParent={`calc(100% - 300px)`}
        onScroll={() => {}} 
        addScrolledClass={true}
        freezePosition={false}
        handleClass="inner-handle"
        minScrollHandleHeight={38}
    >
        //Inner components here...
    </CustomScrollBar>

Specification

  • allowOuterScroll: (boolean, required)
  • heightRelativeToParent: (string, required)
  • onScroll: (Function, required)
  • addScrolledClass: (boolean, required)
  • freezePosition: (boolean, required)
  • handleClass: (string, required)
  • minScrollHandleHeight : (number, required)

For development

just use:

  • $ yarn or $ npm i
  • $ gulp

open your browser http://localhost:3000

For Build

$ ./production

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published