Tailwind CSS Drag and Drop
Use Sortable.js to create drag-and-drop, reorderable lists for modern browsers and touch devices.
Requires Additional Installation
Note that this component requires the use of the third-party Sortable.js library.
Installation
-
Install Sortable.js.
Install
Sortable.jsvia npmTerminalnpm i sortablejs -
Add the Sortable.js JavaScript
Include the JavaScript
<script>near the end of your</body>tag:HTML
Nested sortable lists
Reorder items across nested sortable levels while preserving the hierarchy.