New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@types/draggabilly

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/draggabilly

TypeScript definitions for draggabilly

ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
4.8K
9.5%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/draggabilly

Summary

This package contains type definitions for draggabilly (https://draggabilly.desandro.com).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/draggabilly.

index.d.ts

declare namespace Draggabilly {
    interface Position {
        x: number;
        y: number;
    }

    interface DraggabillyOptions {
        /** Constrains movement to horizontal or vertical axis. */
        axis?: "x" | "y" | undefined;
        /** Contains movement to the bounds of the element. If true, the container will be the parent element. */
        containment?: Element | string | boolean | undefined;
        /** Snaps the element to a grid, every `x` and `y` pixels. */
        grid?: [number, number] | undefined;
        /**
         * Specifies on what element the drag interaction starts.
         *
         * `handle` is useful for when you do not want all inner elements to be used for dragging, like inputs and forms.
         * See [back handle example on CodePen](https://codepen.io/desandro/pen/znAuH).
         */
        handle?: string | HTMLElement | ReadonlyArray<HTMLElement> | NodeList | undefined;
    }

    type DraggabillyClickEventName = "dragStart" | "dragEnd" | "pointerDown" | "pointerUp" | "staticClick";

    type DraggabillyMoveEventName = "dragMove" | "pointerMove";

    interface DraggabillyEventCallback {
        (
            eventName: Draggabilly.DraggabillyClickEventName,
            listener: (
                /** The original event */
                event: Event,
                /** The event object that has `.pageX` and `.pageY` */
                pointer: MouseEvent | Touch,
            ) => void,
        ): Draggabilly;

        (
            eventName: Draggabilly.DraggabillyMoveEventName,
            listener: (
                /** The original event */
                event: Event,
                /** The event object that has `.pageX` and `.pageY` */
                pointer: MouseEvent | Touch,
                /** How far the pointer has moved from its start position */
                moveVector: Draggabilly.Position,
            ) => void,
        ): Draggabilly;
    }
}

declare class Draggabilly {
    position: Draggabilly.Position;

    constructor(element: Element | string, options?: Draggabilly.DraggabillyOptions);

    on: Draggabilly.DraggabillyEventCallback;

    off: Draggabilly.DraggabillyEventCallback;

    once: Draggabilly.DraggabillyEventCallback;

    disable(): void;

    enable(): void;

    setPosition(x: number, y: number): void;

    dragEnd(): void;

    destroy(): void;
}

export = Draggabilly;

Additional Details

  • Last updated: Fri, 15 Aug 2025 08:39:32 GMT
  • Dependencies: none

Credits

These definitions were written by Jason Wu.

FAQs

Package last updated on 15 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts