JSFiddle - React, Tailwind, and code Playground
HTML
<input id="the-input"></input>
JavaScript
$("#the-input").focus(function() {
$(this).css("background", "#ff9");
});
$("#the-input").blur(function() {
$(this).css("background", "#cff");
});