useDraggable
Make an element draggable.Usage
Parameters
Unique identifier for the draggable element. Can be a getter for reactivity.
Initial element to make draggable (usually set via the
ref return value)Initial drag handle element (usually set via the
handleRef return value)Custom data to attach to the draggable instance
Whether the draggable is disabled
Alignment configuration for the draggable element
Array of plugins to apply to this draggable
Array of modifiers to transform drag coordinates
Custom sensors for this draggable instance
Returns
The draggable instance
Signal indicating whether this element is currently being dragged
Signal indicating whether this element is currently dropping
Signal indicating whether this element is the source of the current drag operation
Ref setter to attach the draggable behavior to an element
Ref setter to attach a drag handle to an element
useDroppable
Make an element droppable.Usage
Parameters
Unique identifier for the droppable element. Can be a getter for reactivity.
Initial element to make droppable (usually set via the
ref return value)Array of draggable types this droppable accepts
Type identifier for this droppable
Whether the droppable is disabled
Custom data to attach to the droppable instance
Custom collision detection algorithm
Returns
The droppable instance
Signal indicating whether this element is currently a valid drop target
Ref setter to attach the droppable behavior to an element
useSortable
Combine draggable and droppable functionality for sortable items.Usage
Parameters
Includes all parameters fromuseDraggable and useDroppable, plus:
The sortable group this item belongs to. Can be a getter for reactivity.
The current index of this item in the sortable group. Should be a getter for reactivity.
Optional source element for the sortable
Optional target element for drop positioning
Transition configuration for sortable animations
Priority for collision detection when multiple droppables overlap
Returns
The sortable instance
Signal indicating whether this element is currently being dragged
Signal indicating whether this element is currently dropping
Signal indicating whether this element is the source of the current drag operation
Signal indicating whether this element is currently a valid drop target
Ref setter to attach the sortable behavior to an element
Ref setter to attach a drag handle
Ref setter to attach a source element
Ref setter to attach a target element for drop positioning
useDragDropMonitor
Listen to drag and drop events.Usage
Parameters
Called before drag starts. Can cancel the operation.
Called when drag operation starts
Called when the dragged element moves
Called when dragging over a droppable
Called when drag operation ends
Called when drag operation is cancelled
useDragOperation
Access the current drag operation state.Usage
Returns
Signal for the source draggable element of the current operation
Signal for the current drop target
Signal for the status of the drag operation (idle, dragging, dropping)
useDragDropManager
Access the drag drop manager instance.Usage
Returns
The drag drop manager instance (undefined if called outside DragDropProvider)
useDeepSignal
Create a deep reactive proxy for signal-based objects.Usage
Parameters
An accessor that returns the target object to track (typically contains signals)
Returns
An accessor that proxies access to the target and triggers reactivity on nested signal reads