Dragula is a lightweight JavaScript library that makes drag-and-drop between containers in the browser extremely simple. You provide one or more container elements and it handles all the DOM event wiring so users can drag items within and between containers with natural behavior. By default, any element in those containers can be picked up and dropped in any other container in the group, with sensible rules for what happens if the item is dropped elsewhere. The library includes configuration hooks for customizing what counts as a valid container, whether items are movable, where they can be dropped, and how they behave when “spilled” outside of containers. It works across modern browsers and even older ones, focusing on minimal dependencies and a straightforward API. The included CSS gives you a basic visual style for dragged items and placeholder states, while still being easy to override with your own styles.

Features

  • Simple dragula(containers, options) API to enable drag-and-drop between DOM containers
  • Sensible defaults that allow moving elements between containers with graceful cancel behavior on invalid drops
  • Configurable hooks (isContainer, moves, accepts, invalid) for fine-grained control over what can be dragged where
  • Options for direction, copying vs moving, revert behavior and removal on spill
  • Lightweight implementation with minimal dependencies and built-in CSS that can be customized
  • Widely used in sortable lists, kanban boards and dashboard layouts across many frameworks

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Dragula

Dragula Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

Build gen AI apps with an all-in-one modern database: MongoDB Atlas

MongoDB Atlas provides built-in vector search and a flexible document model so developers can build, scale, and run gen AI apps without stitching together multiple databases. From LLM integration to semantic search, Atlas simplifies your AI architecture—and it’s free to get started.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Dragula!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Libraries

Registered

2025-11-27