JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<body>
    <input id="edValue" type="text" onKeyUp="ValueKeyPress()"><br>
    <span id="lblValue">The text box contains: </span>
</body>

<script>
    function ValueKeyPress(){
       var edValue = document.getElementById("edValue").value;
       if(edValue.length >= 8){
      		 document.getElementById("lblValue").innerText = edValue;
       }     
    }
</script>    
</html>