JSFiddle - React, Tailwind, and code Playground
HTML
<div id="div">Drop here</div>
<div id='drop' draggable="true"> hello </div>
CSS
#div{
width:300px;
height:100px;
line-height:100px;
border:5px dashed #CCC;
font-family:Verdana;
text-align:center;
}
#drop{
background-color:red;
width: 100px;
height: 100px;
}
JavaScript
$('#div').on(
'drop',
function(e){
alert("dropped");
}
);