JSFiddle - React, Tailwind, and code Playground

HTML

<div class="selector">This can be dragged</div>
<span class="selector">This can be dragged</span>
<input type="button" value="This can be dragged" class="selector" />
<button class="selector">This can't be dragged</button>

JavaScript

$(".selector").draggable({
    cancel: "button"
});