Overview
TheDragDropProvider component is the root component for drag and drop interactions. It creates a DragDropManager instance and makes it available to all descendant components via Solid’s context API.
Usage
Props
An optional externally created
DragDropManager instance. If not provided, one will be created automatically.Plugins to use. Defaults to the default preset. Pass an array to replace defaults, or a function to extend them.
Sensors to use. Defaults to
PointerSensor and KeyboardSensor. Pass an array to replace defaults, or a function to extend them.Modifiers to apply to drag operations. Pass an array to replace defaults, or a function to extend them.
Event Props
| Prop | Description |
|---|---|
onBeforeDragStart | Called before a drag operation begins. |
onDragStart | Called when a drag operation starts. |
onDragMove | Called when the dragged element moves. |
onDragOver | Called when the dragged element moves over a droppable target. Call event.preventDefault() to prevent the default behavior of plugins that respond to this event. |
onDragEnd | Called when a drag operation ends (dropped or canceled). |
onCollision | Called when collisions are detected. |