OpusCapita react wrapper for perfect scrollbar


1733.0.43 years ago4 years agoMinified + gzip package size for @opuscapita/react-perfect-scrollbar in KB


React Perfect Scrollbar


React wrapper for perfect-scrollbar with OpusCapita styles.


npm install @opuscapita/react-perfect-scrollbar


View the DEMO



The default build with compiled styles in the .js file. Also minified version available in the lib/umd directory.

CommonJS/ES Module

You need to configure your module loader to use cjs or es fields of the package.json to use these module types. Also you need to configure sass loader, since all the styles are in sass format.


Prop name Type Default Description
className string Extra class names
option object PerfectScrollbar options
containerRef function Ref for the container
onScrollY function onScollY callback
onScrollX function onScollX callback
onScrollUp function onScollUp callback
onScrollYDown function onScollDown callback
onScrollLeft function onScollLeft callback
onScrollRight function onScollRight callback
onYReachStart function onYReachStart callback
onYReachEnd function onYReachEnd callback
onXReachStart function onXReachStart callback
onXReachEnd function onXReachEnd callback

Code example

import React from 'react';
import PerfectScrollbar from '@opuscapita/react-perfect-scrollbar';

export default class ListView extends React.Component {
  render() {
    return (
        <SomeList />

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.