Skip to content

Menu

Scrollbar Styler

Custom scrollbar CSS generator

Runs entirely in your browserFrontendFree, no sign-up
Loading tool

01What is Scrollbar Styler?

Custom scrollbars are awkward because browsers support two different systems. The standard one, from the W3C CSS Scrollbars Styling Module, has just two properties: scrollbar-width and scrollbar-color. The older system is the ::-webkit-scrollbar family of pseudo-elements, which Chrome, Edge and Safari support. It lets you set an exact pixel width, rounded corners and a hover colour. There's a trap when you write both. Chrome and Edge 121 and later ignore every ::-webkit-scrollbar rule on an element that also sets a standard scrollbar property. So naive CSS quietly throws away your radius and pixel width in those browsers. This styler avoids that. It writes rules for a .custom-scrollbar class and wraps the standard properties in @supports not selector(::-webkit-scrollbar). Firefox, which lacks the WebKit pseudo-elements, picks up the standard pair. Browsers that do support them keep the full WebKit styling. You control Width from 2 to 30 pixels, Thumb Radius and Track Radius, and three colours: track, thumb and thumb hover. The standard part can only say thin, auto or none, so the tool writes thin at 8px or less and auto above that. A radius of zero is simply left out of the CSS. Here's a real run. Set width to 12, both radii to 6 and turn on Thumb border. You get scrollbar-width: auto for Firefox, a 12px WebKit bar, and a thumb rule with border-radius: 6px and border: 2px solid #f1f5f9. Because that border matches the track colour, the thumb looks inset with a little padding around it. Hide scrollbar mode replaces all of that with three declarations: -ms-overflow-style: none for old Edge, scrollbar-width: none, and display: none on ::-webkit-scrollbar. Scrolling by wheel, touch and keyboard still works. Three presets load a minimal dark bar, a rounded accent bar and the hidden style. The preview box applies the generated CSS, scoped to that box only. Typed colour values are filtered to characters a CSS colour can contain before they go into the preview style. Nothing is uploaded, since the page builds the CSS with string templates in your browser. The limits come from the platforms, not the tool. Firefox will never show your radius or hover colour. macOS overlay scrollbars may hide until you scroll, and mobile browsers mostly ignore scrollbar styling.

Front-end developers who need scrollbars that match a theme in Chrome, Edge, Safari and Firefox without one browser's rules cancelling the other's. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Scrollbar Styler

  1. Pick a preset (Minimal dark, Rounded accent or Hidden scrollbar) or start from the defaults.
  2. Set Width (px), Thumb Radius (px) and Track Radius (px).
  3. Choose Track Color, Thumb Color and Thumb Hover with the picker or hex field.
  4. Toggle Track border, Thumb border (padding effect) or Hide scrollbar as needed.
  5. Scroll the Preview, click Copy CSS, and add the custom-scrollbar class to your scrollable element.

03Worked examples

Input: Default settings (width 8, track #f1f5f9, thumb #94a3b8, hover #64748b, thumb radius 4)
Result: @supports not selector(::-webkit-scrollbar) { .custom-scrollbar { scrollbar-width: thin; scrollbar-color: #94a3b8 #f1f5f9; } } .custom-scrollbar::-webkit-scrollbar { width: 8px; height: 8px; } .custom-scrollbar::-webkit-scrollbar-track { background: #f1f5f9; } .custom-scrollbar::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; } .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #64748b; }
Condensed here, with comments and blank lines removed. Width, radius and hover reach only browsers that support ::-webkit-scrollbar.
Input: Width 12, thumb and track radius 6, Thumb border on (2px, #f1f5f9)
Result: scrollbar-width: auto; ... .custom-scrollbar::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 6px; } .custom-scrollbar::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 6px; border: 2px solid #f1f5f9; }
Trimmed to the changed lines. Above 8px the standard width becomes auto, and the track-coloured border gives the inset look.
Input: Default settings with Hide scrollbar turned on
Result: .custom-scrollbar { -ms-overflow-style: none; scrollbar-width: none; } .custom-scrollbar::-webkit-scrollbar { display: none; }
Inline comments removed. The element still scrolls by wheel, touch and keyboard.
Input: Width 8, Thumb Radius 0, Track Radius 0
Result: .custom-scrollbar::-webkit-scrollbar-thumb { background: #94a3b8; }
Trimmed. A zero radius is left out of the CSS entirely rather than written as 0px.

04Common use cases

  • Matching scrollbars to a dark theme in an admin dashboard so a bright default bar doesn't stand out
  • Styling the message list of a chat panel or a sidebar nav in a React app
  • Hiding the bar on a horizontal card carousel while keeping wheel, swipe and keyboard scrolling
  • Giving a log viewer or code block a slim bar that doesn't compete with the content
  • Fixing a stylesheet where Chrome ignored ::-webkit-scrollbar rules because scrollbar-color was also set
  • Adding an inset, padded-looking thumb by matching the thumb border to the track colour

05Tips

  • If you'd rather Chrome used the simple standard styling, drop the @supports wrapper. Chrome will then ignore the ::-webkit-scrollbar rules.
  • Hidden scrollbars remove the cue that content scrolls. Add a fade edge, arrows or a partly visible item.
  • Check thumb contrast against the track. A pale grey thumb on a near-white track is hard to find.
  • The class has to sit on the element that actually overflows, with overflow set to auto or scroll.
  • Test on macOS with overlay scrollbars, where the bar may only appear while you scroll.

06Related concepts

scrollbar-color, ::-webkit-scrollbar, overflow, CSS pseudo-elements, scrollbar-width.

Frequently Asked Questions

What is Scrollbar Styler?

Scrollbar Styler is a free, browser-based developer tool on AIDToolStack. Custom scrollbar CSS generator It requires no installation or sign-up and works entirely in your browser.

Is Scrollbar Styler free to use?

Yes. No sign-up, no fees and no usage cap.

Does Scrollbar Styler store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe