Introduction to AnimeCursor
AnimeCursor is a front-end JavaScript library that let web pages have frame‑by‑frame animated cursors.
Unlike native cursors (which cannot animate frame‑by‑frame), AnimeCursor uses pure CSS to create smooth, high‑performance animated cursors – no simulated divs, no JavaScript mouse‑move overhead.
You just prepare your animated cursor images (independent frames), tell AnimeCursor what cursors you need, and it will automatically generate the CSS rules. This gives you a highly customizable animated cursor experience with perfect hotspot accuracy and native‑level performance.
AnimeCursor focuses on visual presentation, making it perfect for:
Personalized portfolios
Pixel / Retro UIs
Experimental interactive websites
It also works well in more conventional contexts:
Admin panels / dashboards
Form‑heavy, high‑accessibility pages
Applications that need to respect system cursor behavior in certain areas
AnimeCursor provides a complete lifecycle API. You can temporarily disable the custom cursor (disable()) where system behavior is required, and re‑enable it (enable()) when animations are needed.
※ AnimeCursor was originally written for my personal website. After realizing I didn't need to reinvent the wheel for every new project, I extracted it into a standalone library.
Native CSS Cursor – Uses the browser’s native cursor, no simulated elements, no mousemove listener (except debug mode).
Independent Frame Images – Supports multi‑frame animations using separate images. AnimeCursor automatically detects numeric suffixes (e.g., cursor_01.png → cursor_02.png).
Variable‑Speed Animation – Use arrays for frames and duration to create complex timing patterns.
Automatic Cursor Switching – Define cursor styles for specific HTML tags or via data-cursor attributes.
Optional Debug Overlay – Shows the current cursor type and coordinates, helpful for calibration.
Lifecycle APIs – refresh(), disable(), enable(), destroy() give you full control.
AnimeCursor relies on modern CSS features (cursor: url(), @keyframes) and is not guaranteed to work on older browsers.