Skip to content

goldfiglabs/react-floating-scrollbar

 
 

Repository files navigation

react-floating-scrollbar

Floating Scrollbar React Component Inspired by (https://github.com/dmarkin/react-floating-scroll).

Install

npm install react-floating-scrollbar

Usage at the parent component:

import ReactFlScrollbar from 'react-floating-scrollbar';

class ParentComponent extends Component {

constructor(props) {
    super(props);

    this.contentRef = React.createRef();
    ...
    }

...

render() {
    return (
        <ReactFlScrollbar contentRef={this.contentRef}
                      innerScrollableClass={`${innerScrollableClassName}`}>
            <div {...props}
                ref={this.contentRef}>
                ....
                </div>
        </ReactFlScrollbar>);
    }
}

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.8%
  • CSS 6.2%