bitshadow/iconate ? reverse-engineered prompt

Reverse engineered prompt

Build me a tiny JavaScript library that lets me animate existing icons into different icons with a smooth trendy transition. I want to be able to take an icon element, tell it the current class and the new class, pick an animation like zoom, fade, flip, rotate, bounce, or rubber band, and then swap the icon when the animation finishes. Please make it work in the browser, and also support CommonJS and AMD so it can be used in different setups.

Include simple styles and a small demo example using an icon font class like a menu icon turning into an arrow. Keep it lightweight and fast, and make sure it works across modern browsers. If you need to check anything, look up the current docs online. Also add a callback option so I can run code after the animation ends.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab