JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<table>
  <tr>
    <td><div class="draggable">0</div></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td><div class="draggable">1</div></td>
    <td><div class="draggable">2</div></td>
  </tr>
  <tr>
    <td></td>
    <td><div class="draggable">3</div></td>
    <td></td>
  </tr>
  
</table>

CSS

td {
  border: 1px solid silver;
  width: 100px;
  height: 100px;
}

.draggable {
  display: inline-block;
  width: 25px;
  height: 25px;
  background: red;
  cursor: pointer;
  margin: 5px;
  color: white;
}

JavaScript

$('.draggable').draggable({
  containment: 'table',
  stop(e, ui) {
    $(this).css({
      left: '',
      top: '',
    });
  },
});

$('td').droppable({
  accept: '.draggable',
  drop(e, ui) {
    ui.draggable.appendTo(this);
  },
});