JSFiddle - React, Tailwind, and code Playground

HTML

<table id="numlist">
    <thead>
        <th>color</th>
    </thead>
    <tbody>
        <tr>
            <td>one</td>
        </tr>
        <tr>
            <td>two</td>
        </tr>
    </tbody>
</table>
<a href="#" id="add">add</a>

CSS

.newrow {
   background-color: red;
   transition: background-color 1s linear;
}
tr {
  background-color: none;
  transition: background-color 1s linear;
}

JavaScript

$("#add").click(function (event) {
        
        event.preventDefault();
        var $el = $("#numlist").prepend("<tr class='newrow'><td>somenum</td></tr>");
        setTimeout(function() { $('.newrow',$el).removeClass('newrow')}, 1000);
    });