react-browser-scrollbar
v1.1.5
Published
lightweight Scrollbar for ReactJs
Downloads
16
Maintainers
Readme
lightweight Scrollbar for ReactJs. It just customize the browser scrollbar with CSS and added some react flavor
Use
import Scrollbar from 'react-browser-scrollbar'
const App = () => {
const ref = useRef()
// included methods in ref
// ref.scrollTo(number)
// ref.scrollToTop()
// ref.scrollToBottom()
return (
<Scrollbar
ref={ref}
autoHide
darkMode
thumbSize={6}
onScroll={(event) =>{
}}
onScrollEnd={(event) => {
}}
onScrollStart={(event) => {
}}
onScrollStop={(event) => {
}}
>
Children...
</Scrollbar>
)
}