An easy to implement and customize React scrollbar component with OS native scroll behavior.
npm install react-awesome-scroll

- Custom styled scrollbar with exact native behavior.
- Easily customisable
- No external dependencies
- Has 2 style presets out of the box: You can use it out of box or just with the styles needed for component to scroll content properly. (Or disable all of the styles and add them manually in your project stylesheet system).
bash
npm install react-awesome-scroll --save
`$3
`bash
yarn add react-awesome-scroll
`Usage
$3
In order to use the component with it out-of-the-box design, you'll need to just call the component in your React app.
You will also need to limit the height of its wrapper, so that the component can get its size limits.
`javascript
import Scroll from 'react-awesome-scroll';class CustomScroll extends Component {
// Contains demo wrapper
render() {
return (
/ Any content here /
);
}
}
`$3
`javascript
import Scroll from 'react-awesome-scroll';class CustomScroll extends Component {
// Contains demo wrapper
render() {
return (
className="scroll"
containerClassName="scroll-container"
innerClassName="scroll-inner"
scrollClassName="scroll-track"
barClassName="scroll-bar"
barActiveClassName="scroll-bar-active"
disableStyles
disableUIStyles
>
/ Any content here /
);
}
}
``