What is the CSS Range Slider Generator?
Style custom range input sliders with CSS. Configure thumb size, track height, fill colour, and hover states.
Everything runs locally in your browser. Adjust the controls above, preview instantly, and copy clean, production-ready CSS — no account, no upload.
Using the CSS Range Slider Generator
Everything lives in the panel at the top of this page. There is nothing to install — it all runs right here in your browser.
Set track height and colour
The track is the horizontal bar. Set its height (2px-8px) and background colour for the unfilled portion.
Configure the thumb
Set thumb diameter (12px-24px) and colour. The thumb is the draggable handle.
Copy the CSS
Both -webkit and -moz syntaxes are included. Apply the class to your range input element.
What the generated code looks like
Clean, production-ready CSS — no vendor bloat, no unnecessary declarations.
input[type="range"].custom-range {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: 4px;
border-radius: 2px;
background: #e5e7eb;
outline: none;
cursor: pointer;
}
input[type="range"].custom-range::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 18px;
height: 18px;
border-radius: 50%;
background: #0071e3;
cursor: pointer;
transition: transform 0.1s;
}
input[type="range"].custom-range::-webkit-slider-thumb:hover {
transform: scale(1.2);
}
input[type="range"].custom-range::-moz-range-thumb {
width: 18px;
height: 18px;
border: none;
border-radius: 50%;
background: #0071e3;
cursor: pointer;
}Range inputs require separate -webkit-slider-thumb and -moz-range-thumb rules. Chromium-based browsers (Chrome, Edge, Opera, Safari) use the -webkit prefix. Firefox uses -moz.
Common mistakes & how to fix them
A few habits trip people up. Here is what to watch for — and the exact fix.
Missing appearance: none on the input
Without appearance: none, the browser default range track renders over the custom track.
Fix: Add both -webkit-appearance: none and appearance: none to the input[type="range"] rule.
Pro tips for better results
Show fill progress with a linear-gradient background
CSS cannot natively fill the track up to the thumb position. Use a JavaScript input event listener to update a CSS custom property and apply it as a linear-gradient background on the track.
Frequently asked questions
From the blog
Read more →CSS Box Shadow: A Complete Guide with Examples (2026)
Master CSS box-shadow: every value explained, layering multiple shadows for realistic depth, inset shadows, the spread trick, and copy-paste examples for cards, buttons, and more.
CSS Animations: A Practical Guide to Keyframes and Transitions (2026)
Learn the difference between transitions and keyframe animations, how to write @keyframes, the properties worth animating for 60fps, and easing that actually looks good.
CSS clamp() and Fluid Typography: Stop Writing Font-Size Media Queries (2026)
Learn how CSS clamp() creates type that scales smoothly between screen sizes with a single line, the formula behind it, and how to build a fully fluid type scale without media queries.