pawnimation
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

Pawnimation

An animation library, basically just a simple wrapper around the Animation API.

Example

import { paw } from "pawnimation"

const funny = document.querySelector<HTMLButtonElement>("button.funny")!

funny.addEventListener("click", async  () => {
	await paw(funny)
		.duration(400)
		.option("direction", "alternate")
		.option("iterations", 5)
		.ease()
		.animate({ rotate: 360 + "deg" })
		.finished

	await paw(funny)
		.duration(200)
		.ease("cubic-bezier(0.34, 1.56, 0.64, 1)")
		.animateStay({ scale: 2 })
		.finished

	console.log("animations finished")
})

/pawnimation/

    Package Sidebar

    Install

    npm i pawnimation

    Weekly Downloads

    49

    Version

    1.2.1

    License

    ISC

    Unpacked Size

    3.74 kB

    Total Files

    4

    Last publish

    Collaborators

    • och-och