UNPKG

rani-motion

Version:

A simple and powerful React animation library with TypeScript support - animated.div style components with accessibility-first approach

38 lines 3.12 kB
import React from 'react'; import { AnimationPreset, CustomAnimation, EasingType } from '../../types'; interface AnimationProps { animation?: AnimationPreset; customAnimation?: CustomAnimation; duration?: number; delay?: number; easing?: EasingType; triggerOnce?: boolean; threshold?: number; } type AnimatedElementProps<T extends keyof JSX.IntrinsicElements> = JSX.IntrinsicElements[T] & AnimationProps; declare const animated: { div: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"div">, "ref"> & React.RefAttributes<HTMLElement>>; span: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"span">, "ref"> & React.RefAttributes<HTMLElement>>; section: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"section">, "ref"> & React.RefAttributes<HTMLElement>>; article: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"article">, "ref"> & React.RefAttributes<HTMLElement>>; header: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"header">, "ref"> & React.RefAttributes<HTMLElement>>; footer: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"footer">, "ref"> & React.RefAttributes<HTMLElement>>; main: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"main">, "ref"> & React.RefAttributes<HTMLElement>>; nav: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"nav">, "ref"> & React.RefAttributes<HTMLElement>>; h1: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"h1">, "ref"> & React.RefAttributes<HTMLElement>>; h2: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"h2">, "ref"> & React.RefAttributes<HTMLElement>>; h3: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"h3">, "ref"> & React.RefAttributes<HTMLElement>>; h4: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"h4">, "ref"> & React.RefAttributes<HTMLElement>>; h5: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"h5">, "ref"> & React.RefAttributes<HTMLElement>>; h6: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"h6">, "ref"> & React.RefAttributes<HTMLElement>>; p: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"p">, "ref"> & React.RefAttributes<HTMLElement>>; a: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"a">, "ref"> & React.RefAttributes<HTMLElement>>; button: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"button">, "ref"> & React.RefAttributes<HTMLElement>>; img: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"img">, "ref"> & React.RefAttributes<HTMLElement>>; ul: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"ul">, "ref"> & React.RefAttributes<HTMLElement>>; ol: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"ol">, "ref"> & React.RefAttributes<HTMLElement>>; li: React.ForwardRefExoticComponent<Omit<AnimatedElementProps<"li">, "ref"> & React.RefAttributes<HTMLElement>>; }; export default animated; export type { AnimatedElementProps, AnimationProps }; //# sourceMappingURL=index.d.ts.map