You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option to show the scrollbar when you hover over the container. #415
Maybe renderThumbVertical prop is the thing you need.
Since this package renders your scrollbar as a div, you can achieve it this way:
Add custom-scrollbar-container to Scrollbars className and add custom-scrollbar to className of the div inside renderThumVertical prop (feel free to name the classes your way)
.custom-scrollbar-container.custom-scrollbar{/* Use opacity here instead of display:none for a good looking transition */opacity:0;transition-property: opacity !important;transition-duration:0.3s!important;}.custom-scrollbar-container:hover.custom-scrollbar{opacity:100;}
You can simply right click on the scrollbar and inspect it
Addtionally, if you want to change width of scrollbar, add this
Thanks for the help man!
I need to wrap this scrollbar into table element
but the above code shared also seem to not work.
I have a structure like this
<Scrollbarsstyle={{width: 500,height: 300,}}renderThumbVertical={({ ...props})=>(<div{...props}className='custom-scrollbar'></div>)}><tableclassName='custom-scrollbar-trigger'>{/* rows go here */}</table></Scrollbars>
Activity
tuan-hda commentedon Mar 7, 2023
Maybe
renderThumbVerticalprop is the thing you need.Since this package renders your scrollbar as a div, you can achieve it this way:
custom-scrollbar-containerto Scrollbars className and addcustom-scrollbarto className of the div inside renderThumVertical prop (feel free to name the classes your way)You can simply right click on the scrollbar and inspect it
Addtionally, if you want to change width of scrollbar, add this
Chandan4862 commentedon Mar 8, 2023
Thanks for the help man!
I need to wrap this scrollbar into table element
but the above code shared also seem to not work.
I have a structure like this
tuan-hda commentedon Mar 9, 2023
Does your code look like this one?
Then you should try this one