Drag and Drop Documentation

Features

  • Super easy to set up
  • No bloated dependencies
  • Figures out sort order on its own
  • A shadow where the item would be dropped offers visual feedback
  • Touch events!
  • Seamlessly handles clicks without any configuration

Initialization

Initialize the plugin by referencing the necessary files:

<script src="dragula.min.js"></script>
<link rel="stylesheet" type="text/css" href="dragula.min.css">

Code Structure

Dragula provides the easiest possible API to make drag and drop a breeze in your applications.

dragula([document.querySelector('#left'), document.querySelector('#right')]);