animation-utils
/
5.0.5
animation-utils 5.0.5
Install from the command line:
Learn more about npm packages
$ npm install @zestia/animation-utils@5.0.5
Install via package.json:
"@zestia/animation-utils": "5.0.5"
About this version
Utils for working with animations and transitions.
npm install --save-dev @zestia/animation-utils
Add the following to ~/.npmrc
to pull @zestia scoped packages from Github instead of NPM.
@zestia:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<YOUR_GH_TOKEN>
// Wait for animations to start and finish
await waitForAnimation(element);
// Wait for animations to finish, if there are any
await waitForAnimation(element, { maybe: true });
// Wait for animations to start and finish, including descendants
await waitForAnimation(element, { subtree: true });
// Wait for an animation to start and finish by name
await waitForAnimation(element, { animationName: 'fade-out' });
// Wait for a transition to start and finish by name
await waitForAnimation(element, { transitionProperty: 'margin-left' });
// Wait for an animation to start and finish by name, including descendants
await waitForAnimation(element, { subtree: true, animationName: 'move' });