Custom vertical scrollbar
npm i react-custom-scrollbar --save
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
<CustomScrollBar
allowOuterScroll={false}
heightRelativeToParent={`calc(100% - 300px)`}
onScroll={() => {}}
addScrolledClass={true}
freezePosition={false}
handleClass="inner-handle"
minScrollHandleHeight={38}
>
//Inner components here...
</CustomScrollBar>
allowOuterScroll
: (boolean, required)heightRelativeToParent
: (string, required)onScroll
: (Function, required)addScrolledClass
: (boolean, required)freezePosition
: (boolean, required)handleClass
: (string, required)minScrollHandleHeight
: (number, required)
just use:
- $ yarn or $ npm i
- $ gulp
open your browser http://localhost:3000
$ ./production