PACKAGE · DRAG & DROP

@atlaskit/pragmatic-drag-and-drop

The core package for Pragmatic drag and drop - enabling fast drag and drop for any experience on any tech stack

WEEKLY DOWNLOADS 428.1K
STARS 12.7K
FORKS 324
OPEN ISSUES 101
GZIP SIZE 41 B
UNPACKED SIZE 500.0 kB
LAST UPDATED 3mo ago
DOWNLOAD TRENDS

@atlaskit/pragmatic-drag-and-drop downloads — last 12 months

Download trends for @atlaskit/pragmatic-drag-and-drop1 download series from Jun 2025 to May 2026. Use left and right arrow keys to inspect monthly values.01.2M2.4M3.6M4.8MJun 2025SepDecMarMay 2026
@atlaskit/pragmatic-drag-and-drop
ABOUT @ATLASKIT/PRAGMATIC-DRAG-AND-DROP

The @atlaskit/pragmatic-drag-and-drop package provides a highly performant and accessible solution for implementing drag-and-drop functionalities across various web technologies. It tackles the common challenge of creating intuitive user interactions for reordering lists, moving items between containers, or enabling custom drag operations, abstracting away much of the browser's native complexity and accessibility concerns.

Designed with a focus on pragmatism and performance, this library caters to developers seeking a robust yet efficient drag-and-drop experience. Its core philosophy emphasizes minimal DOM manipulation and leverages declarative patterns, making it suitable for both complex application states and performance-critical user interfaces. The library aims to be framework-agnostic, though its primary integrations often lean towards React-based ecosystems.

Key to its API is the concept of 'actions' and 'drop targets'. Developers define draggable items using `Draggable` and drop destinations using `Droppable`. Event listeners and state management are facilitated through hooks and functions that manage the lifecycle of a drag operation, including `useDraggable` and `useDroppable` alongside event handlers for `onDragStart`, `onDrop`, and `onDragEnter`. This structured approach ensures predictable behavior and simplifies the implementation of complex drag-and-drop workflows.

While not tied to a specific framework, @atlaskit/pragmatic-drag-and-drop integrates seamlessly into modern JavaScript development workflows. It is particularly well-suited for applications built with React, where hooks can be readily employed to manage drag state. Its design principles also align with SSR and server-component architectures, allowing for progressive enhancement and improved initial load times, as it primarily operates on client-side interactions.

With a remarkably small gzip bundle size of only 57 B, this package offers exceptional performance characteristics without a significant impact on load times. This efficiency is achieved through careful optimization and a focus on core drag-and-drop mechanics, making it a viable option even for performance-sensitive applications. The library is mature and actively maintained, indicated by its significant GitHub stars and forks, suggesting widespread adoption and community trust.

Developers should be aware that while the library aims for framework agnosticism, its primary examples and strongest integrations are often within the React ecosystem. For very simple drag-and-drop needs, such as a single draggable element with no drop targets, the overhead might be more than necessary. Furthermore, its comprehensive nature means there's a learning curve associated with mastering its full range of capabilities for highly custom interactions.

WHEN TO USE
  • When implementing complex reorderable lists within React applications, leveraging `Draggable` and `Droppable` to manage item movement.
  • When building a multi-column layout where users can drag items between different columns, using `DragDropContext` to manage global state.
  • When ensuring accessible drag-and-drop experiences for users relying on keyboard navigation or screen readers, as the library includes built-in accessibility features.
  • When integrating drag-and-drop functionality into an existing Atlassian Design System-based application, benefiting from pre-built components and patterns.
  • When optimizing for performance and small bundle sizes, utilizing its minimal 57 B gzipped footprint for core drag-and-drop logic.
  • When needing to integrate drag-and-drop into server-rendered applications or frameworks that support progressive enhancement.
WHEN NOT TO USE
  • If you only require very basic drag-and-drop, such as a single element that can be moved without dropping onto specific targets, a simpler custom solution or lighter library might suffice.
  • If your application strictly prohibits any client-side JavaScript execution for interactive elements, as this library relies on DOM manipulation and event handling.
  • If you are working in a highly specialized environment that restricts the use of advanced browser APIs or DOM event listeners, which this library extensively utilizes.
  • If your drag-and-drop needs are limited to a single, static element and do not involve reordering or transferring items between distinct zones, consider a more focused, lighter alternative.
  • If your project has an extremely restrictive Content Security Policy (CSP) that may interfere with the dynamic creation or manipulation of DOM elements required for drag operations.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 2
@atlaskit/pragmatic-drag-and-drop vs @dnd-kit/core ★ 17.2K · 8.6M/wk @atlaskit/pragmatic-drag-and-drop vs react-beautiful-dnd ★ 34.0K · 1.1M/wk