JSFiddle - React, Tailwind, and code Playground

HTML

<script>
  function size_max(elem)
  {
  	var span = document.getElementById(elem.getAttribute('data-id'));
    var size = parseInt(span.style.fontSize,10)+5;
    span.style.fontSize = size+'px';
  }
</script>
<input type="button" value="button" data-id="text" onclick="size_max(this)">
<span id="text" style="font-size:15px;">text</span>