Tip Of AI
Discover what you can do with AI
shapcn is a JavaScript based icon morphing engine designed to create more natural transitions between interface icons. Instead of moving every path point at the same time, it analyzes each icon, identifies bodies and connected parts, and builds a structural rig before animation begins. This allows elements such as antennae, heads, handles, and other details to move in a logical order. Deep parts leave first and arrive last, while new parts grow from connected edges rather than appearing through fading or melting effects. Mirror parts can move together, and unmatched parts are absorbed into or created from the main body. The tool supports icons from Lucide, Tabler, Phosphor, Remix, Hugeicons, and custom icon collections. It can be used with a script tag and a custom morph icon element, with examples for HTML and React. The current engine is approximately 75 KB gzipped, while the full Lucide icon collection is approximately 220 KB gzipped. The planned npm package is still in progress, but the source code is available on GitHub under the MIT license. A playground provides icon selection, random pairs, duration controls, and copyable usage examples.