React-custom-scrollbars: Change color of scrollbar?

Created on 9 Aug 2017  路  3Comments  路  Source: malte-wessel/react-custom-scrollbars

I'd like to change the color of the scrollbar with an inline style. I see the examples for renderTrackHorizontal but can't seem to figure out how to change the actual handle itself. Would like to adjust the opacity of it.

Thanks!

Most helpful comment

Just to comment on this, this was the solution (for vertical handle), I was using the wrong render:

<Scrollbars renderThumbVertical={({ style, ...props }) =>
   <div {...props} style={{ ...style, backgroundColor: '#000, width: '4px', opacity: '0.5'}}/>
}>

All 3 comments

The same for me.

Just to comment on this, this was the solution (for vertical handle), I was using the wrong render:

<Scrollbars renderThumbVertical={({ style, ...props }) =>
   <div {...props} style={{ ...style, backgroundColor: '#000, width: '4px', opacity: '0.5'}}/>
}>

For me this does not have any effect on the handle itself.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonkberg picture simonkberg  路  3Comments

danmo picture danmo  路  4Comments

limbosounds picture limbosounds  路  4Comments

mhemrg picture mhemrg  路  4Comments

leofle picture leofle  路  4Comments