UNPKG

potentio

Version:

Unstyled & accessible knob primitive for React and Vue

10 lines (8 loc) 297 B
import { Ref } from 'vue'; export interface DragOptions { axis?: 'x' | 'y' | undefined; } export interface DragState { delta: [number, number]; } export declare function useDrag(elementRef: Ref<HTMLElement | undefined>, callback: (state: DragState) => void, options?: DragOptions): void;