JSFiddle - React, Tailwind, and code Playground

by SirDerpington

HTML

<button type="button" id="draggable" class="ui-widget-content">
    <p>Drag me around</p>
</button>
<div class="demo-description">
    <p>Enable draggable functionality on any DOM element. Move the draggable object by clicking on it with the mouse and dragging it anywhere within the viewport.</p>
</div>

CSS

#draggable {
    width: 150px;
    height: 150px;
    padding: 0.5em;
}

JavaScript

$(function () {
       $("#draggable").draggable({
           cancel: false
       });

   });