mozDraggables Library (vanilla-js)

I recently needed a minimal simple library for handling drag and drop behaviours of dynamic HTML elements, and while I like‘s library for resize/drag/drop at 85kb (js), I decided I wanted something smaller. Mozilla’s MDN example code did the job mostly, so I uncoupled, restructured, parameterised some options and committed as mozDraggables under the MIT license.

In the end, the mozDraggables library weights in at 2.8kb (js) and 461 bytes (css).

Demo of mozDraggables with static and dynamic loaded drag and drop elements.

See the Readme.MD and demos for defaults, options and further details on the Github repo.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.