JSFiddle - React, Tailwind, and code Playground

by borisjavier

HTML

<label class="range" for="range">0</label>
<input type="text" id="num" value="0">
<input id="range" type="range" min="0" max="100"/>

JavaScript

document.querySelector("num").addEventListener("change", function(e){
    document.querySelector("num").value=e.currentTarget.value;
})