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
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
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