CSS Range Slider Generator
Style HTML range sliders with cross-browser CSS — track, fill, and thumb colors, sizes, and shadow — with a draggable live preview and copy-ready code. Free.
💡 How to use
- Range sliders need separate pseudo-elements for WebKit/Blink and Firefox — the CSS covers both.
- Add the
rangeclass to your<input type="range">. - The fill color uses a track gradient that works in all browsers. Include the small JS snippet so the fill follows the value as it changes.
Free CSS Range Slider Generator
Style HTML range slider inputs with CSS and copy the code in one click. Customise the track color and height, the fill color, and the thumb size, color, and shadow, with a live preview you can drag — then paste cross-browser CSS covering Chrome, Edge, Safari, and Firefox. Free, no sign-up, runs in your browser.
What this tool does
The default <code><input type="range"></code> slider looks different in every browser and is notoriously hard to style. This generator produces the vendor-specific CSS you need to give a range slider a consistent, branded look across Chrome, Edge, Safari, and Firefox — controlling the track, the filled portion, and the draggable thumb. Drag the live preview to see exactly how it behaves.
How to use the range slider generator
It is instant:
- Set the track color and height and the corner radius.
- Choose the thumb size and color and toggle its shadow.
- Pick a fill color for the filled portion.
- Drag the preview to test it, then copy the CSS.
Why range sliders need special CSS
A range input is built from separate shadow-DOM parts, and each engine names them differently. WebKit and Blink browsers (Chrome, Edge, Safari) use <code>::-webkit-slider-thumb</code> and require <code>-webkit-appearance: none</code> to allow styling, while Firefox uses <code>::-moz-range-thumb</code>, <code>::-moz-range-track</code>, and <code>::-moz-range-progress</code>. Because there is no single standard selector, you must write both sets of rules — which is exactly what this generator does for you.
About the filled portion
Showing the track filled up to the thumb is easy in Firefox thanks to <code>::-moz-range-progress</code>, and this tool includes it. WebKit browsers do not expose a native progress part, so the generated CSS keeps a clean single-color track there; if you need a filled look in Chrome and Edge too, you can add a small piece of JavaScript that updates a background gradient as the value changes. For most interfaces the styled track and thumb are enough.
Accessibility and usability
Keep the thumb large enough to be an easy touch target — around 20px or more helps on mobile. Make sure the thumb has clear contrast against the track so it is easy to see, and never remove the keyboard focus behaviour, since range sliders are operable with arrow keys. Always pair a slider with a visible label and, ideally, a text display of the current value so the setting is clear to everyone.
Pro tip
Match the thumb and fill color to your brand accent and reuse the same <code>.range</code> class everywhere for consistency. Store the accent color as a CSS variable so a theme change updates every slider at once. Combine this with our CSS Checkbox & Radio and Text Input generators to style a complete, cohesive form.
FAQ
Is this CSS Range Slider Generator free?
Why do I need both -webkit and -moz rules?
How do I style the thumb of a range input?
Can I show the filled part of the track?
How do I make the slider taller or the thumb bigger?
Is the styled slider still keyboard accessible?
Does it work in all browsers?
Related tools
Pro tip: pair this tool with CSS Box-Shadow Generator and CSS Flexbox Generator for a faster SEO workflow.