Create beautiful custom scrollbars with live preview and cross-browser support
Scroll down to see your custom scrollbar in action!
This is a preview of your vertical scrollbar styling.
This is a preview of your horizontal scrollbar styling. It extends beyond the visible area to demonstrate the horizontal scrollbar.
Scrollbar styling is primarily done using the following CSS pseudo-elements:
::-webkit-scrollbar - The entire scrollbar::-webkit-scrollbar-track - The track (progress bar) of the scrollbar::-webkit-scrollbar-thumb - The draggable scrolling handleFor Firefox, you'll need to use scrollbar-width and scrollbar-color properties. If you're working with other interactive elements, you might find our toggle switch generator useful for creating consistent UI controls.
Custom scrollbars are well-supported in modern browsers:
The rounded corners on your scrollbar thumb can be further refined using our border radius generator to match your design system. For more complex visual effects, consider combining scrollbar styling with custom shadow effects to create depth and visual hierarchy in your interface.
This tool creates WebKit pseudo-element selectors (::-webkit-scrollbar) with standard CSS properties. For Firefox compatibility, it also generates scrollbar-color and scrollbar-width properties.
Custom scrollbars enhance visual consistency with your design system, provide better UX feedback through hover states, and can improve accessibility with appropriate color contrast.
All styling happens locally in your browser. No data is sent to external servers. Your design choices remain private and secure.
The generated code includes both WebKit-specific pseudo-elements and Firefox's standard CSS properties. Non-supporting browsers will display default system scrollbars.
WebKit pseudo-elements (::-webkit-scrollbar) work in Chrome, Safari, Edge, and Opera. Firefox uses different properties: scrollbar-width and scrollbar-color. For complete cross-browser support, include both implementations as this generator does.
* selector for production; target specific elementsCopy-Paste Workflow:
Responsive Adjustments:
/* Example: Thinner scrollbars on mobile */
@media (max-width: 768px) {
.custom-scrollbar::-webkit-scrollbar {
width: 6px;
}
}
* can style unintended elements like textareasThis tool complements other CSS generators on our site. For complete UI styling, consider:
Q: Why doesn't Firefox support ::-webkit-scrollbar?
A: Firefox implements scrollbar styling via CSS Scrollbars Module Level 1 standard properties, while WebKit browsers use vendor-prefixed pseudo-elements for historical reasons.
Q: Can I animate scrollbar properties?
A: Most scrollbar properties can be transitioned (colors, border-radius). Layout properties like width/height may not animate smoothly in all browsers.
Q: How do I target only horizontal scrollbars?
A: Use ::-webkit-scrollbar:horizontal for horizontal and ::-webkit-scrollbar:vertical for vertical scrollbars separately. For complex layouts, our transform generator can help with advanced positioning.
Last updated: January 2026 | Compatibility reviewed for Chrome 120+, Firefox 121+, Safari 17+, Edge 120+
All processing occurs client-side. No external dependencies or data collection.