Interface DragValue

A value returned from the useDrag hook.

interface DragValue {
    cancelDrag: (() => void);
    dragProps: DOMAttributes<Element>;
    isDragged: boolean;
}

Properties

cancelDrag: (() => void)

Cancels the current drag interaction.

dragProps: DOMAttributes<Element>

Props of an element for which drag is tracked.

An object which identity never changes between renders.

isDragged: boolean

true if an element is currently being dragged.