JSFiddle - React, Tailwind, and code Playground

HTML

<span data-range-min="1" data-range-max="5"><input type="range" id="test" min="1" max="5" /></span>

CSS

span {
    position: relative;
    font-family: Arial;
    color: #aaa;
    font-weight: bold;
    font-size: 14px;
}
span:after {
    position: absolute;
    top: .6em;
    right: 10px;
    content: attr(data-range-max);
}
span:before {
    position: absolute;
    top: .6em;
    content: attr(data-range-min);
    left: 10px;
}