JSFiddle - React, Tailwind, and code Playground

by nderscore

HTML

<input type="range" min="10000" max="1000000" step="10000" value="10000" id="i">
<div id="o">

</div>

CSS

input {
  width: 320px;
  height: 64px;
}

JavaScript

const i = document.getElementById('i');
const o = document.getElementById('o');

const update = () => {
  o.innerHTML = Number(i.value).toLocaleString('en-US', {
 		style: 'currency',
    currency: 'USD',
  });
};

i.addEventListener('input', update);
update();