motion
Version:
The Motion library for the web
5 lines (4 loc) • 431 B
TypeScript
import { AnimationOptionsWithOverrides, MotionKeyframes } from "../../dom/types";
import { AnimationCallback, MotionCSSProperties } from "../types";
import { RefObject } from "react";
export declare function useAnimation(ref: RefObject<HTMLElement>, initial: MotionKeyframes | MotionCSSProperties, target: MotionKeyframes, options: AnimationOptionsWithOverrides, onStart?: AnimationCallback, onComplete?: AnimationCallback): void;