Design5 min read
How to Create a Styled Range Input (Slider) in Webflow
Learn how to style a range input in Webflow with custom CSS and display the value in real time.
In this tutorial, Sandro, cofounder of the Gemeos Webflow agency, shows you how to style a range input (slider) in Webflow so you can fully customize it with CSS.
Example
| CSS pseudo-element | Browser | Targets |
|---|---|---|
| ::-webkit-slider-thumb | Chrome, Safari, Edge | The draggable thumb |
| ::-webkit-slider-runnable-track | Chrome, Safari, Edge | The slider track |
| ::-moz-range-thumb | Firefox | The draggable thumb |
| ::-moz-range-track | Firefox | The slider track |
1. Add a range input in a Webflow embed
In an Embed, paste this HTML. Add the ID range-slider and the ID range-value on the Text Block that displays the value.
2. Style the slider with CSS
input[type="range"] {
-webkit-appearance: none;
width: 100%;
height: 4px;
border-radius: 4px;
background: #e0e0e0;
outline: none;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: #3b82f6;
cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
width: 20px;
height: 20px;
border-radius: 50%;
background: #3b82f6;
cursor: pointer;
border: none;
}3. Display the value in real time
const slider = document.getElementById('range-slider');
const output = document.getElementById('range-value');
slider.addEventListener('input', function() {
output.textContent = slider.value;
});Conclusion
A styled range input makes interactive forms better. Use cases:
- Budget or price calculator
- Numeric value filter for results
- Satisfaction gauge in a form


