Create Flying Icons With JavaScript – wand.js

Category: Animation , Javascript | September 20, 2021
Views Total:430 views
Official Page:Go to website
Last Update:September 20, 2021


Create Flying Icons With JavaScript – wand.js


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">

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",

You Might Be Interested In:

Leave a Reply