JSFiddle - React, Tailwind, and code Playground
HTML
<div id="panel1">
<input type="button" value="add" id="btn1" />
<br>
<input type="button" value="add" id="btn2" />
<br>
<input type="button" value="add" id="btn3" />
</div>
<div id="panel2" style="background-color:gray"></div>
JavaScript
$("input[value='add']").click(function () {
$(this).appendTo("#panel2");
$(this).val("remove");
$(this).addClass("remove");
});