About this project
Draggable is a JavaScript library that provides complete control over drag-and-drop behavior by abstracting native browser events into a comprehensive API. It is designed for creating custom drag-and-drop experiences and includes additional modules: Sortable, Droppable, and Swappable. Draggable itself handles the heavy lifting—creating mirrors, emitting events, managing sensor events, and making elements draggable—while the additional modules build on top of it to offer sorting, dropping, and swapping functionalities.
Key features include support for native drag, mouse, touch, and force touch events; extensibility through event lifecycle hooks and custom sensors; and an ES6-first target. The library is available via npm, yarn, or CDN, with both ESM and UMD builds. It includes TypeScript definitions and is compatible with the latest versions of Chrome, Firefox, Opera, Safari, and Edge.
Draggable comes with several plugins: Collidable, ResizeMirror, Snappable, SwapAnimation, and SortAnimation, which enhance dragging behavior. Sensors include DragSensor, ForceTouchSensor, MouseSensor, and TouchSensor. The documentation is organized within the source directories, covering events, plugins, and modules.
Note: The library is no longer maintained by its original authors at Shopify, but maintenance has been passed to new collaborators, and they are still seeking additional maintainers. Contributions are welcome, and there are related resources like Ember CLI shims. The project is copyrighted by Shopify (2018-present).
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.