@quietui/scurry
v3.1.0
Published
Animations, easings, and utilities for use with the Web Animations API.
Downloads
372
Maintainers
Readme
Scurry
Animations, easings, and utilities for use with the Web Animations API.
Built for Quiet UI.
Installation
npm install @quietui/scurry
Importing animations
To import an animation:
import { tada } from '@quietui/scurry';
Note: if you're importing directly from a browser, use the full path to prevent the entire library from loading. Make sure to replace @quiet/scurry
with the path to the library, either a CDN or a local folder.
import { tada } from '/path/to/scurry/dist/animations/tada.js';
import { easeInOut } from '/path/to/scurry/dist/easings/ease-in-out.js';
Importing easings
To import an easing:
import { easeInOut } from '@quietui/scurry';
Using with the Web Animations API
To animate an element directly with the Web Animations API:
import { flip, easeInSine } from '@quietui/scurry';
const el = document.getElementById('my-element');
el.animate(flip, {
duration: 1500,
iterations: Infinity,
easing: easeInSine
});
Attribution
- Animations are based on the timeless Animate.css library.