JSFiddle - React, Tailwind, and code Playground
by darcyclarke
HTML
<div class="drop"></div>
CSS
.drop {
position: absolute;
width: 100%;
height: 100%;
display: block;
background: red;
}
JavaScript
// Wait until the document has loaded
jQuery(function($) {
// Listen for when a user drops a file on our box
$('.drop').on('drop', function(e){
e.preventDefault();
console.log(e);
return false;
});
// The Image data
var sourceImage = '';
// Instantiate a new version of the ColorTheif Class Plugin
//var colorThief = new ColorThief();
// Get the primary color from our image data
//colorThief.getColor(sourceImage);
});