@dnd-kit/core
dnd kit – a lightweight React library for building performant and accessible drag and drop experiences
This package has a good security score with no known vulnerabilities.
Community Reviews
Solid DnD library with excellent accessibility but memory management quirks
The library's approach to state management through contexts works well but requires understanding of React's render cycle to avoid unnecessary re-renders. The modifiers system is powerful for constraints and transforms, though the documentation assumes you understand the coordinate system internals. Error boundaries are your friend here—sensor activation failures can be silent without proper logging hooks.
Timeout behavior during drag operations is configurable but defaults could be more aggressive for slower devices. The migration from v5 to v6 had breaking changes in collision detection APIs that required careful testing. Resource cleanup is generally good, but watch for leaked RAF callbacks if you implement custom sensors.
Best for: Complex drag-and-drop interfaces requiring accessibility compliance and custom interaction patterns with moderate to high item counts.
Avoid if: You need simple sortable lists only (use @dnd-kit/sortable directly) or require built-in analytics and error tracking for drag operations.
Solid drag-and-drop with excellent accessibility, but requires manual optimization
The performance story requires attention though. By default, every drag operation triggers re-renders across your tree. You'll need to memoize components aggressively and use the collision detection algorithms carefully. With large lists (500+ items), expect to implement virtualization yourself and carefully manage which components subscribe to drag state. The measuring phase can cause jank if you have complex layouts.
Error boundaries are essential—the library doesn't handle malformed data gracefully and will throw during drag if items disappear mid-operation. There's no built-in retry logic for failed operations. Documentation is thorough but scattered; expect to read source code for edge cases. Configuration is verbose but predictable. No breaking changes between minor versions in my experience.
Best for: Applications needing accessible, customizable drag-and-drop with complex sorting or spatial logic where you can invest time in optimization.
Avoid if: You need plug-and-play performance with massive lists or lack time to implement proper memoization strategies.
Solid drag-and-drop with performance hooks, but memory management needs care
Error handling is minimal. When sensors fail (touch events on iOS Safari can be finicky), you get silent failures unless you implement custom logging in your onDragEnd handlers. The accessibility features work well out of the box, but there's no built-in retry logic if drag operations fail. Resource cleanup is generally good—event listeners are properly removed—but complex nested droppable scenarios can leak references if you're not careful with your context structure.
Configuration is extremely flexible through modifiers and sensors, though this means more setup code compared to simpler libraries. No breaking changes between 6.x versions have bitten me. Timeout behavior is predictable, and it handles rapid successive drags without choking, though you'll want to debounce any heavy operations in your drag handlers.
Best for: Complex, performance-critical drag-and-drop interfaces where you need fine-grained control over behavior and can invest time in proper optimization.
Avoid if: You need a plug-and-play solution with extensive error reporting or are building simple drag-and-drop without performance constraints.
Sign in to write a review
Sign In