This tool lets you design a custom scrollbar and copy cross-browser CSS for it. Set the scrollbar width, corner radius and the track and thumb colours, then scroll the live preview to see it in action. Browsers use two different mechanisms for scrollbar styling, and this generator outputs both so your design works everywhere.
How it works
There is no single standard for scrollbar styling, so the tool emits two rule sets:
- WebKit pseudo-elements (
::-webkit-scrollbar,::-webkit-scrollbar-track,::-webkit-scrollbar-thumb) for Chrome, Edge and Safari, where your width, radius and colours are applied directly. - Standard properties (
scrollbar-widthandscrollbar-color) for Firefox, wherescrollbar-colortakes the thumb colour first, then the track.
Both reflect the same width and colour choices, so the scrollbar looks consistent across browsers.
Example
A 12px-wide scrollbar with an indigo thumb (#6366f1) on a light track (#e2e8f0) produces:
/* Standard (Firefox) */
scrollbar-width: thin;
scrollbar-color: #6366f1 #e2e8f0;
/* WebKit (Chrome, Edge, Safari) */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #e2e8f0; }
::-webkit-scrollbar-thumb { background: #6366f1; border-radius: 8px; }
Everything runs in your browser — nothing is uploaded.
Everything runs in your browser — nothing is uploaded.