UNPKG

rooks

Version:

Collection of awesome react hooks

25 lines (24 loc) 650 B
/** * Easing function type */ type EasingFunction = (t: number) => number; /** * Animation options */ interface AnimationOptions { duration: number; easing?: EasingFunction; delay?: number; loop?: boolean; } /** * useAnimation hook * * @deprecated useAnimation is deprecated and will be removed in a future major version. * Please migrate to useEasing for better control and features. * @param options Animation options * @returns The current value of the animation (0 to 1) * @see https://rooks.vercel.app/docs/hooks/useEasing */ declare function useAnimation(options: AnimationOptions): number; export { useAnimation };