JSFiddle - React, Tailwind, and code Playground
HTML
<div id="drop_div">Drag and drop a file here</div>
CSS
div#drop_div{
width:400px;
height:300px;
background:#ccc;
border:10px dotted #aaa;
text-align:center;
font:22px Georgia;
color:#666;
line-height:300px;
}
JavaScript
$(function(){
$('div').on('drop',function(e){
e.originalEvent.stopPropagation();
e.originalEvent.preventDefault();
$(this).html('A file was dropped!').css({'font-size':'40px','color':'#aa0000'});
}).on('dragover', function (e) {
e.preventDefault();
});
});