Architecture
The Solid integration is built on top of the core@dnd-kit/dom package and provides:
- Hooks: Reactive hooks that manage drag and drop state
- Components: Solid components for context and overlay management
- Type Safety: Full TypeScript support with proper type inference
- Signals Integration: Deep integration with SolidJS signals and reactivity
Core Concepts
DragDropProvider
The root component that provides drag and drop context to your application:Hooks
Solid hooks provide reactive drag and drop functionality:- useDraggable: Make elements draggable
- useDroppable: Make elements droppable
- useSortable: Combine draggable and droppable for sortable items
- useDragDropMonitor: Listen to drag and drop events
- useDragOperation: Access the current drag operation state
- useDragDropManager: Access the drag drop manager instance
Ref-Based Element Attachment
Solid hooks return ref setters for attaching elements:Installation
Package Exports
Core
DragDropProvider- Context provider componentDragOverlay- Overlay component for drag previewuseDraggable- Draggable hookuseDroppable- Droppable hookuseDragDropManager- Manager access hookuseDragDropMonitor- Event monitoring hookuseDragOperation- Drag operation state hookuseInstance- Instance creation hook
Sortable
useSortable- Sortable item hookisSortable- Type guard for sortable instancesisSortableOperation- Type guard for sortable operations
Utilities
useDeepSignal- Deep reactivity bridge for signals
Sensors
PointerSensor- Mouse and touch inputKeyboardSensor- Keyboard navigation
Reactivity Model
The Solid integration usescreateEffect to sync reactive properties and createSignal for refs:
Next Steps
Hooks
Detailed reference for all Solid hooks
Quick Start
Get started with Solid integration