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

0.1.2 • Public • Published

Fading

fadeIn & fadeOut HTML elements as a Promise, with ~200 bytes gzipped.

fadeIn

let el = document.getElementById("#button");

fadeIn(el, 600)
	.then(() => {
		console.log("Fade in complete!");
	});

fadeOut

let el = document.getElementById("#button");

fadeOut(el, 600)
	.then(() => {
		console.log("Fade out complete!");
	});

Package Sidebar

Install

npm i fading

Weekly Downloads

6

Version

0.1.2

License

MIT

Unpacked Size

28.7 kB

Total Files

14

Last publish

Collaborators

  • movahhedi