jDev Studios

DraggableJS first release!

12th Aug 2022

Hello World! This time I’m showing off the small draggable elements library I made for JavaScript, draggable.js!

draggable.js is a small (3.5 KiB) JS library that allows you to create draggable surfaces and put draggable elements inside surfaces. It fires events when an element is dragged or clicked that allow you, for example, to store positions on a database or open menus.

This library was made because, upon searching “js drag library” on Google, the first two results are Shopify’s draggable and interact.js. Shopify’s draggable library has a simple API, but uses more than 8KB! interact.js has a simple API, but uses more than 100KB! It was obvious a simple and smaller dragging library had to exist, so I made draggable.js!

I hope you can find a use case and, as always, remember to keep coding, experimenting and tinkering!

Ainara Garcia

ainara.dev