Documentation Index
Fetch the complete documentation index at: https://mintlify.com/clauderic/dnd-kit/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Multiple sortable lists enable drag-and-drop between different containers, perfect for kanban boards, file organizers, and categorized item management. Items can be reordered within lists or moved between them.Basic Multiple Lists
Key Concepts
Groups
Thegroup prop associates items with their container:
Accept Types
Theaccept prop defines what types of draggables a sortable can receive:
- Items can only be dropped into containers that accept their type
- Columns that accept
['column', 'item']can receive both
Collision Priority
When items overlap,collisionPriority determines which should be considered:
Event Handling
onDragOver vs onDragEnd
onDragOver for:
- Real-time visual feedback
- Immediate state updates (optimistic UI)
onDragEnd for:
- Persisting changes to backend
- Non-optimistic updates (wait until drag completes)
Cancellation Handling
Always handle canceled drags to restore state:Advanced Patterns
Styled Columns with Colors
Adding Items to Lists
Removing Items
Nested Sortables
Columns themselves can be sortable:Sensors Configuration
Customize how drag operations are triggered:- Enables both mouse/touch and keyboard navigation
- Allows activation via the element or its handle
Feedback Configuration
Control visual feedback during dragging:'clone': Shows a clone of the item while dragging'move': Moves the original item
Real-World Example: Kanban Board
Performance Optimization
- Memoize components: Use
React.memoto prevent unnecessary re-renders - Snapshot state: Keep a snapshot for quick rollback on cancel
- Debounce backend saves: Don’t save on every
onDragOver
Next Steps
- Learn about virtualized lists for handling large kanban boards
- Explore collision detection strategies for fine-tuning drop behavior