Contains data associated with a drag operation, including transferable and site-local information.
String-based key-value pairs to be transferred with the drag event.
Type | Record |
Data that remains local to the site and is not transferred via the drag event's DataTransfer object.
Type | Record |
Callback function executed during a drag event.
params | DragEventParams (docs) |
void
Arguments passed during a drag event lifecycle.
The HTML element currently being dragged.
Type | HTMLElement |
Current cursor position during the drag.
Type | DragPosition |
Current drag state data.
Type | DragData |
Describes the final state of a drag-and-drop move operation.
Element that was being dragged.
Type | HTMLElement |
Element into which the drag was dropped.
Type | HTMLElement |
Indicates if the drag was initiated via keyboard.
boolean
True if the drop occurred in the left half of the element.
boolean
Bounding rectangle of the drop target.
Type | DOMRect |
True if the drop occurred in the top half of the element.
boolean
X coordinate of the drop.
number
Y coordinate of the drop.
number
Function to render the drag placeholder UI. This UI is rendered in isolation and does not respond to app state changes.
params | DragPlaceholderParams (docs) |
ReactNode
Represents the current pointer position during a drag operation.
Client X coordinate.
number
Client Y coordinate.
number
Fired when a drop action is finalized and the dragged element is released over a drop zone.
params | DropEventParams (docs) |
void
Represents the full context passed to the drop event handler.
The HTML element that was dragged.
Type | HTMLElement |
The HTML element onto which the drop occurred.
Type | HTMLElement |
Details the last-known drag position and target info before drop.
Type | DragMoveState |
The drag data at the time of drop.
Type | DragData |
Parameters for configuring drag behavior using a React hook.
Screen reader message to announce drag end.
string
Screen reader message to announce drag start.
string
Accessible label describing how to perform the drag operation.
string
Function to compute the drag payload when dragging begins.
Type | GetDragDataFn |
Keyboard key used to initiate drag mode.
string
Keyboard key used to execute the drop.
string
Keyboard key used to move to the next drop zone.
string
Keyboard key used to move to the previous drop zone.
string
Called at the end of a drag operation, regardless of drop.
Type | DragEventFn |
Invoked frequently as the drag position updates.
Type | DragEventFn |
Called at the beginning of a drag operation.
Type | DragEventFn |
Triggered when the drag results in a drop.
Type | DropEventFn |
Function to generate placeholder content for the drag preview.
Offset [x, y] in pixels from the cursor position for rendering the drag placeholder.
No properties