JSFiddle - React, Tailwind, and code Playground

by Alexey Ukolov

HTML

<input type="range" min="0" max="500" step="50" id="range" value="100" />
<p id="value">100 км</p>

JavaScript

document.querySelector('#range').addEventListener('change', function (event) {
  document.querySelector('#value').textContent = event.target.value + ' км';
})