JSFiddle - React, Tailwind, and code Playground

HTML

<button>Button</button>
<div id='myDivId'>DIV</div>

CSS

div{background:red;}

JavaScript

$("button").click(function(){ 
      $('#myDivId').animate({ backgroundColor: 'blue' }, 10000);
});