JSFiddle - React, Tailwind, and code Playground

HTML

<input type='text' id='area' style='border: 1px solid;'></input><br>
<div id='text1' style='display:none; '>Examletext</div>

JavaScript

$(document).ready(function() {
$("#area").keyup(function() {
    //if ($("#area").value.length > 0){
        if ($('#text1').is(":hidden")) {
            $('#text1').show(500);
        } else {
            $("#text1").hide(500);
        }
   // }
 });
});