Architecture
The Vue integration is built on top of the core@dnd-kit/dom package and provides:
- Composables: Reactive hooks that manage drag and drop state
- Components: Vue components for context and overlay management
- Type Safety: Full TypeScript support with proper type inference
- Reactivity: Deep integration with Vue’s reactivity system
Core Concepts
DragDropProvider
The root component that provides drag and drop context to your application:Composables
Vue composables 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
Reactivity Integration
The Vue integration usesMaybeRefOrGetter<T> types to accept refs, getters, or raw values:
Installation
Package Exports
Core
DragDropProvider- Context provider componentDragOverlay- Overlay component for drag previewuseDraggable- Draggable composableuseDroppable- Droppable composableuseDragDropManager- Manager access composableuseDragDropMonitor- Event monitoring composableuseDragOperation- Drag operation state composableuseInstance- Instance creation composable
Sortable
useSortable- Sortable item composableisSortable- 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
Next Steps
Composables
Detailed reference for all Vue composables
Quick Start
Get started with Vue integration