finds.dev← search

// the find

desandro/draggabilly

★ 3,868 · JavaScript · MIT · updated Mar 2022

:point_down: Make that shiz draggable

Draggabilly is a small JavaScript library that makes DOM elements draggable, handling both mouse and touch input. It supports axis constraints, containment, grid snapping, and drag handles. Best suited for projects that need simple draggable UI widgets without pulling in a full UI framework.

Unified pointer event handling across mouse and touch without you having to wire up both manually. The staticClick event is genuinely useful — it solves the real problem of click events firing at the end of a drag. Clean separation of pointerDown/pointerMove/pointerUp from dragStart/dragMove/dragEnd gives you fine-grained control. Zero runtime dependencies in the vanilla JS path; jQuery is optional via the bridget pattern.

Last commit was March 2022 — the repo is effectively unmaintained, which matters if you hit a browser bug or need Pointer Events API improvements. No momentum/inertia support, so drops feel abrupt. No TypeScript definitions shipped in the package; you'd be pulling them from DefinitelyTyped and hoping they track. For anything beyond simple dragging (reordering lists, kanban columns, resizable panels), you'll outgrow it immediately and wish you'd reached for interact.js or SortableJS instead.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →