wand.js is a tiny JavaScript library for creating flying icons (like bubbles, stars, confetti, hearts) that can be triggered by any JS event.
How to use it:
1. Import the wand.js library.
<script src="/wand.js"></script>
2. Create an element (an HTML button in this example) to trigger the flying icons.
<button id="wand"> Like </button>
3. Initialize the Wand on the trigger element, determine the trigger event, and specify the path to the icon.
const {start} = window.Wand({
targetSelector: "#wand",
event: "click",
iconSrc: "heart.svg",
});






