Customize `::-webkit-scrollbar` inline with React

Viewed 18307

How can I apply the ::-webkit-scrollbar pseudo elements to a component using inline styling in React?

3 Answers

You can't write pseudo selector inline, you need to add it in css. Refer this link

This worked in my project '&::-webkit-scrollbar': { width: 0, }

React suggests this

<div style={{ '&::WebkitScrollbar': { width: 0, height: 0 } }}></div>
Related