JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" class="textBox"></input>
<div class="infoBox">Info Box</div>

JavaScript

$(function () {
    $('.textBox').keyup(function (e) { 
        if ($('.textBox').val().length < 1) {       
            $('.infoBox').fadeOut(100); 
        } 
    });
});