React Animatable Versions Save

Tiny(~1kB) animation hooks for React, built on Web Animations API.

0.13.2

1 year ago

0.13.1

1 year ago
  • Updated readme.
  • Make bundle size bit smaller.

Full Changelog: https://github.com/inokawa/react-animatable/compare/0.13.0...0.13.1

0.13.0

1 year ago
  • Fixed useAnimation and useAnimationFunction to be able to pass some argument when play.
const animate = useAnimation<{ x: number; y: number }>(
  (prev, args) => [
    { transform: prev.transform },
    { transform: `translate(${args.x}px, ${args.y}px)` },
  ],
  {
    duration: 400,
    easing: "ease-in-out",
  }
);

useEffect(() => {
  animate.play({ args: { x: 100, y: 200 } });
}, [])
  • BREAKING: removed useAnimationController hook and persist method in favor of prev and args functionality of useAnimation.
  • BREAKING: renamed AnimationGroup to TransitionGroup

What's Changed

Full Changelog: https://github.com/inokawa/react-animatable/compare/0.12.1...0.13.0

0.12.1

1 year ago

0.12.0

1 year ago

What's Changed

BREAKING: ref field was remove from AnimationHandle and AnimationController type. Just pass them directly to target element!

const animate = useAnimation(...);
return <div ref={animate}>...</div>

Full Changelog: https://github.com/inokawa/react-animatable/compare/0.11.1...0.12.0

0.11.1

1 year ago

0.11.0

1 year ago

0.10.3

1 year ago
  • Fix useAnimation to accept function as keyframe

Full Changelog: https://github.com/inokawa/react-animatable/compare/0.10.2...0.10.3

0.10.2

1 year ago
  • Persist style in useTransitionAnimation

Full Changelog: https://github.com/inokawa/react-animatable/compare/0.10.1...0.10.2

0.10.1

1 year ago
  • Ignore uncaught promise error in useTransitionAnimation hook

Full Changelog: https://github.com/inokawa/react-animatable/compare/0.10.0...0.10.1