JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="k1" />
JavaScript
$('input').keydown(function(e){
$("#reffield").css( { backgroundColor:"red" } );
});
<input type="text" id="k1" />
$('input').keydown(function(e){
$("#reffield").css( { backgroundColor:"red" } );
});