Style a scrollbar without hiding how to scroll
A scrollbar helps visitors understand that a region contains more content. Styling it can make a code panel fit the interface, but a very thin or low-contrast thumb makes the control harder to see and use. Browser and operating-system settings may override its appearance.
How to use this tool
- Choose a thumb and track color with a visible difference. Apply the style to a specific scrollable panel rather than every element.
- Set a practical width and corner radius. Test dragging as well as wheel, touch, and keyboard scrolling.
- Copy the generated CSS and check your supported browsers. Include standard properties where appropriate instead of relying only on WebKit-specific selectors.
These standard properties set the thumb and track colors for a panel while keeping normal width. The panel still needs enough content to overflow before a scrollbar appears. Overlay scrollbars may remain hidden until the visitor interacts.
Read the reference documentation ↗