@i2cinc/animations
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

Animations

Installation

npm i @i2cinc/animations

Usage

Importing all animations:

import * as animations from '@i2cinc/animations';

Importing individual animations:

import { bounce } from '@i2cinc/animations';

Importing easings:

import { easings } from '@i2cinc/animations';

Animating an element:

<div style="display: block; width: 100px; height: 100px; background: tomato; margin: 2rem;"></div>

<script type="module">
  import { easings, flip } from 'https://cdn.jsdelivr.net/npm/@i2cinc/animations@1/dist/index.js';

  const box = document.querySelector('div');

  box.animate(flip, {
    duration: 1500,
    iterations: Infinity,
    easing: easings.easeInSine
  });
</script>

This example uses the jsDelivr CDN. To import the library locally, install it and make node_modules/@i2cinc/animations/dist available to your app or bundler.

Developers

To build the project, run:

npm run build

Package Sidebar

Install

npm i @i2cinc/animations

Weekly Downloads

2

Version

1.1.6

License

MIT

Unpacked Size

39.5 kB

Total Files

107

Last publish

Collaborators

  • faizanhaider