YumYum
YumYum: an animation library that takes bites out of shapes and images, for loaders, progress bars and delete transitions.
Overview
YumYum is a small animation library for eating effects. You hand it an SVG path or an image, and it eats it bite by bite with crumbs flying off. It began as Cookie Cruncher, a cookie clicker toy, and became a library for loaders, progress indicators and delete animations in React or plain JavaScript.



My role
Creator: design and engineering.
How it works
- Paths set the shape: Every animation starts from an SVG path. The library parses the path into a grid of where bites can land, so a bite only happens inside the shape. Image eating uses an SVG mask cut from the same path.
- One engine, two front ends: The bite logic lives in one shared engine. A React hook and a plain JavaScript class both call it, so the two behave the same. React is an optional peer dependency (version 18 or 19), and the vanilla class does not need it.
- Crumbs: Crumbs are a small particle system. In React they render as SVG. In vanilla JavaScript they draw on a canvas overlay.
- Tuning: Bites arrive every 200 ms by default, or on demand. Bite size, bite roundness (0 is jagged, 1 is smooth, default 0.9), crumb gravity (0.2) and air resistance (0.96) are all settings. A drill-in bias runs from 0, which peels the shape, to 1, which drills into it. The reset animation takes 800 ms by default.
- Pieces: React components cover a single eaten item, an image eater, a loader, a progress bar, a circular progress indicator and a delete animation. The library does not depend on any CSS framework.
Its limits
The repository has no automated tests. Behavior is checked by eye in the demo app, and CI only confirms that the library type-checks and builds. Shapes have to be given as SVG paths.
Where it stands
The first commit is from January 5, 2026, when the project was called Snacking. It was renamed YumYum on June 12, 2026, and two days later the duplicated bite algorithm was pulled into the shared engine. The package is set up as @snackstudio/yumyum 1.0.0 under the MIT license and is not yet published to npm. The demo, with its live tuning panel, is on GitHub Pages.