With his Dragula open source library, developer Nicolas Bevacqua is looking to make drag-and-drop so simple that "it hurts."
Dragula is a micro-library, sized at about 48KB, and is exclusively focused on drag-and-drop capabilities. Now at version 3.6.3, it has been fitted with much better touch event support, handling more mobile browsers.
"A drag-and-drop library helps developers allow users of their websites to move elements around the page," said Bevacqua, an independent Web consultant, in an email. "In the case of Dragula, it helps you move elements from one container to another, as well as sort elements in the same container on a page." Dragula, he said, makes this simple by providing an intuitive and easy-to-use API.
"Dragula is simple because it caters to the most common use cases while providing options to accommodate for the more advanced use cases as well," said Bevacqua. "A key feature in Dragula is that it was designed starting at its API, making it simple for developers to use," he said. "At the same time, Dragula is a very small component that doesn't meddle with your websites, staying out of your way and allowing you to compound that small library with other small libraries to get the results that you need."
Libraries before Dragula came out were large and did lots of things, while Dragula only focuses on providing a drag-and-drop experience that also works on mobile devices, said Bevaqua. JQuery UI, for example, came with dozens of components, and the drag-and-drop component had a complicated API that focused on implementation rather than on the consumer of that API, he said.