About this tool
CSS Scrollbar Designer builds the CSS for a custom scrollbar and previews it on a scrollable box of 14 lines of sample text. Four controls shape the result: width from 2 to 30 pixels, thumb corner radius from 0 to 20 pixels, a track colour and a thumb colour, both chosen with colour pickers. The CSS updates as you move each control.
The copied code has two parts. First come ::-webkit-scrollbar, ::-webkit-scrollbar-track and ::-webkit-scrollbar-thumb rules that set the size, the colours and the rounding; the width value is used for both width and height, so vertical and horizontal bars match. After them, a scrollbar-width: thin and scrollbar-color declaration with the same two colours is added inside an @supports not selector(::-webkit-scrollbar) block, so only browsers without the WebKit pseudo-elements, such as Firefox, use it. The selector in the copied code is .scrollbox, so add that class to your scrollable element or replace the selector with your own, such as a container that has overflow: auto.
Two limits are worth knowing. The standard properties cannot set a pixel width or a radius, so a browser without the WebKit rules, such as Firefox, shows a thin bar in your colours rather than your exact width and rounding. There is also no separate hover or pressed colour for the thumb. Many touch devices draw overlay scrollbars that ignore this styling altogether.