JSFiddle - React, Tailwind, and code Playground
by nottrobin
HTML
<input id="defaultSlider" value="62.5" type="range" min="0" max="125" />
CSS
input[type="range"] {
-webkit-appearance: none;
background: linear-gradient(to left, #E1DAD2 50%, #DD4713 50%);
height: 10px;
margin: 50px;
border-radius: 5px;
width: 170px;
box-shadow: inset 1px 1px 3px rgba(0,0,0,0.6);
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width:12px;
height: 12px;
border-radius: 2px;
background: #fff;
box-shadow: 1px 2px 3px rgba(0,0,0,0.6);
border: 1px solid #E1DAD2;
position: relative;
}
input[type="range"]::-webkit-slider-thumb:after {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
border-color: transparent transparent white transparent;
border-style: solid;
border-width: 5px;
top: -10px;
}
input[type="range"]::-webkit-slider-thumb:before {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
border-color: transparent transparent #E1DAD2 transparent;
border-style: solid;
border-width: 6px;
top: -12px;
left: -1px;
}