motion-v
Version:
<p align="center"> <img width="100" height="100" alt="Motion logo" src="https://user-images.githubusercontent.com/7850794/164965523-3eced4c4-6020-467e-acde-f11b7900ad62.png" /> </p> <h1 align="center">Motion for Vue</h1>
23 lines (22 loc) • 624 B
TypeScript
import { Options } from '../../types';
import { InertiaOptions } from 'framer-motion';
export interface StateHandlers {
enable: VoidFunction;
disable: VoidFunction;
}
export interface Gesture {
isActive: (options: Options) => void;
subscribe: (element: HTMLElement, stateHandlers: StateHandlers, options: Options) => () => void;
}
export interface DragOptions {
constraints?: {
top?: number;
right?: number;
bottom?: number;
left?: number;
};
dragSnapToOrigin?: boolean;
dragElastic?: number;
dragMomentum?: boolean;
dragTransition?: InertiaOptions;
}