JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://raw.github.com/jquery/jquery-color/master/jquery.color.js"></script>
<input type="text" id="userInput"></input>

JavaScript

$('#userInput').keydown(function(){
  $(this).css("backgroundColor",'#4E1402');
$(this).delay(2000).queue(function(){
    $(this).css("backgroundColor",'#555');});
 });