@wellwind/thanos-snap
v0.0.5
Published
Use [Thanos](https://www.google.com/search?q=Thanos) snap to destory your DOM elements.
Downloads
368
Readme
thanos-snap
Use Thanos snap to destory your DOM elements.
Installation
npm install html2canvas ramda @wellwind/thanos-snap
or
yarn add html2canvas ramda @wellwind/thanos-snap
Then import the scripts.
import { thanosSnap, thanosRewind } from '@wellwind/thanos-snap';
Usage
// destroy the element, and rewind it after 3s.
const element = document.querySelector('someElm');
thanosSnap(element).then(() => {
setTimeout(() => {
thanosRewind(element);
}, 3000);
});
Are you using Angular
There is also an Angular library called @wellwind/ngx-thanos. You can simple add a directive to your element, and enjoy the Thanos snap effect.