Function useWebAnimations

  • Returns {
        animate: (
            element: Element,
            keyframes: PropertyIndexedKeyframes | Keyframe[],
            options?: AnimationOptions,
        ) => { animation: Animation; id: string };
        cancelAnimation: (idOrAnimation: string | Animation) => void;
        getAllAnimations: () => Animation[];
        pauseAnimation: (idOrAnimation: string | Animation) => void;
        playAnimation: (idOrAnimation: string | Animation) => void;
        get state(): { animations: Map<string, Animation>; isSupported: boolean };
        subscribe(callback: (state: WebAnimationsState) => void): () => boolean;
    }