JSFiddle - React, Tailwind, and code Playground

HTML

<input id="txtBox" type="text" />

JavaScript

$(document).ready(function() {
   
 $("#txtBox").keydown(function() {   
     alert("KeyDown has been clicked");
 });
            
});