JSFiddle - React, Tailwind, and code Playground

HTML

<div class="block">My text</div>

CSS

.block {
    width: 100px;
    padding: 20px;
    background: #ccc;
    text-align: center;
    cursor: move;
}

JavaScript

$(".block").draggable({
    stop: function(event, ui) {
        var pos = ui.helper.position(); // just get pos.top and pos.left
        alert(pos.top + "\n" + pos.left);
    }
});