canvas-confetti is an HTML5 canvas animation library and browser particle effect engine designed to render celebratory confetti bursts. It functions as a visual effects tool that transforms SVG paths, emojis, and text into animated particles.
The library offloads heavy particle calculations to a web worker to maintain main thread responsiveness and prevent the user interface from lagging. It includes built-in support for operating system reduced motion settings, automatically disabling animations for users with motion sensitivities to ensure accessibility compliance.
The system supports configurable particle streams with adjustable directions and timing, as well as the ability to bind animations to specific canvas elements rather than the full browser window. Sequence completion is handled via promises that resolve once particles exit the screen or the timer expires.