
Description
React Custom Scroll is a React component that lets you style the browser scroll bar so it looks the same in every browser. The scroll itself stays native, so scroll animations and scroll speed behave as they normally do. Only the visible design and layout of the scroll bar change. The scrollbar sits above the content rather than floating beside it, and scrolled and unscrolled content keep the same layout. You wrap your content in the component and remove any overflow styles from its root. Two CSS classes, rcs-custom-scrollbar and rcs-inner-handle, let you change the container and the handle's color, background and border. Props such as allowOuterScroll, which blocks the outer page from scrolling while the content scrolls, and heightRelativeToParent, which limits content height relative to its parent, adjust behavior. The component ships in module and CommonJS builds and can be loaded from unpkg. It was tested with React 19 and needs React 18 or later.…
Highlights
- Custom scroll bar that looks the same across browsers
- Native scroll behavior and speed are kept
- Style the handle with CSS classes
- Props for outer scroll and height relative to parent
- Works with React 18 and later
Ratings & Reviews
No ratings yet
Be the first to rate react-custom-scroll.
People also visit
react-custom-scroll FAQ
What does it do?
It replaces the visible design of the browser scroll bar with a custom one that looks the same in every browser, while scrolling still uses the native behavior.
How do I use it?
Wrap your content with the custom scroll component and remove overflow styles from the content root. It is available in module or CommonJS format, or from the unpkg CDN.
How can I change the look?
Style the rcs-custom-scrollbar class for the container and rcs-inner-handle for the handle. The demo page shows an example.
Which React versions work?
It was tested with React 19 and requires React 18 or higher.
What are the best react-custom-scroll alternatives?
Popular alternatives to react-custom-scroll include react-custom-scrollbars, rc-scrollbars and react-scrollbar. See all react-custom-scroll alternatives




















