Makes an image bounce to indicate loading, as in KDE
bouncingIcon brings to your web pages the bouncing icons that KDE shows when launching an application. Some people hated that, but I cracked myself up every time I saw the bouncing icons.
You can use the bouncing icon to provide a visual clue that some loading is happening, for AJAX requests, heavy data processing, etc.
But hey... enough of my yakkin'. Whaddaya say, let's boogie!
You can make the icon follow the mouse pointer, as in KDE.
Or you can make the icon stay on a fixed position.
$ npm install @koas/bouncing-icon
If you installed it via npm, you should import it first:
import BI from "@koas/bouncing-icon";
To start the bouncing just call
Required. The URL of the image that will bounce.
Optional. The default value is followCursor. Other accepted values are topLeft, topRight, bottomLeft and bottomRight.
To stop bouncing and remove the icon call
I hope you find this little toy useful. Feel free to fork it or open issues with bugs or suggestions for improvement.
This plugin is free and open source, so you can use it in any project, commercial or not. If you want to support the developer you can donate via PayPal. Thanks!