Skip to content

useAnimare

A custom react hook to make it easy to create animations in React.

syntax
function useAnimare(callback: () => TimelineObject, deps?: React.DependencyList): TimelineObject;

Usage

example
import { useAnimare } from 'animare/react';
function MyComponent() {
const timeline = useAnimare(() => {
return animare.timeline(...params);
// or
return animare.group(...params);
// or
return animare.single(...params);
}, []);
}