JSFiddle - React, Tailwind, and code Playground
HTML
<div class="draggable">test</div>
<div id="droppable"></div>
CSS
#droppable{
width: 300px;
height: 300px;
background-color:red;
}
JavaScript
$(".draggable").click(function(){alert("test");});
$(".draggable").draggable({
helper: 'clone'
});
$("#droppable").droppable({
drop: function(ev, ui) {
$(this).append(ui.draggable.clone(true));
}
});