JSFiddle - React, Tailwind, and code Playground
HTML
<div id="draggable">Blah</div>
CSS
#draggable {
width: 100px;
height: 100px;
border: 1px solid;
}
JavaScript
$(function() {
$("#draggable").draggable({
drag: function() {
var offset = $(this).offset();
$(this).html(offset.left + ', ' + offset.top);
}
});
});