react-layout-motion
Version:
React layout animation library (coming soon)
11 lines (10 loc) • 362 B
TypeScript
import type { MotionConfig } from "../types";
export declare enum MotionState {
INITIAL = "initial",
ANIMATE = "animate",
EXIT = "exit"
}
export declare function useMotionAnimation<T extends HTMLElement>(elementRef: React.RefObject<T | null>, config?: MotionConfig): {
currentState: MotionState;
performExitAnimation: () => Promise<void>;
};