konfeti - v0.6.0
    Preparing search index...

    Type Alias ClickOptions

    Click Listener Settings (third argument of onClick).

    // fire on press, and keep each burst's handle
    Konfeti.onClick(button, { particleCount: 30 }, {
    trigger: "pointerdown",
    onFire: (burst) => burst.then(() => console.log("done")),
    });
    type ClickOptions = {
        onFire?: (handle: KonfetiHandle, event: MouseEvent) => void;
        trigger?: "click" | "pointerdown";
    }
    Index
    onFire?: (handle: KonfetiHandle, event: MouseEvent) => void

    Burst Callback. Called with the handle of every burst the listener fires, and the event that fired it. Use it to pause, stop or await click bursts, which onClick itself cannot return.

    none
    
    trigger?: "click" | "pointerdown"

    Trigger Event. "click" fires when a click completes. "pointerdown" fires as soon as the mouse button, finger or pen goes down: it feels snappier and keeps working when the page cancels touch events (common in games and playable ads, where preventDefault() on touch suppresses click).

    "click"