JSFiddle - React, Tailwind, and code Playground
HTML
<div>The text in <span>12</span>px: this is the size</div>
<br>
<br>
<input type="range" min="10" max="40">
CSS
div {
padding:20px;
background:#eee;
font-size:12px
}
JavaScript
$('input').on('change', function () {
var v = $(this).val();
$('div').css('font-size', v + 'px')
$('span').html(v);
});