@vielzeug/necromancer
v3.0.0
Published
Dependency-free, lifecycle-owned animation primitives built on the Web Animations API
Downloads
683
Readme
@vielzeug/necromancer
Lifecycle-owned Web Animations API primitives with native access, per-handle groups, and additive FLIP
Installation
pnpm add @vielzeug/necromancer
npm install @vielzeug/necromancer
yarn add @vielzeug/necromancerQuick Start
import { animate } from '@vielzeug/necromancer';
const button = document.createElement('button');
button.textContent = 'Save';
document.body.append(button);
const handle = animate(
button,
[{ opacity: 0, transform: 'translateY(8px)' }, { opacity: 1, transform: 'translateY(0)' }],
{ duration: 180, easing: 'ease-out' },
);
handle.animation.pause();
await handle.result;
handle.dispose();Documentation
License
MIT © Helmuth Saatkamp — part of the Vielzeug monorepo.
