interface DragDropConfiguration {
    callbacks?: Record<
        | "dragstart"
        | "drop"
        | "dragover"
        | "dragenter"
        | "dragleave"
        | "dragend",
        (event: DragEvent) => void,
    >;
    dragSelector?: null | string;
    dropSelector?: null | string;
    permissions?: Record<"dragstart" | "drop", (selector: string) => boolean>;
}

Properties

callbacks?: Record<
    | "dragstart"
    | "drop"
    | "dragover"
    | "dragenter"
    | "dragleave"
    | "dragend",
    (event: DragEvent) => void,
>

Callback functions for each action

dragSelector?: null | string

The CSS selector used to target draggable elements.

dropSelector?: null | string

The CSS selector used to target viable drop targets.

permissions?: Record<"dragstart" | "drop", (selector: string) => boolean>

Permission tests for each action