Skip to content
C

Canvas Confetti

performant confetti animation in the browser

by catdadFree

#430in Utilities
0In stores

Description

canvas-confetti is a small JavaScript library that creates confetti animations in the browser, drawn on a canvas for good performance. You c…

Highlights

  • Canvas-based confetti animation
  • Returns a Promise when finished
  • Reduced motion option
  • Custom shapes from SVG paths
  • Install from npm or a CDN

Ratings & Reviews

No ratings yet

Be the first to rate Canvas Confetti.

People also visit

R

react-confetti

React component to draw confetti for your party

UI Libraries
Launch
S

Sparticles

JavaScript Particles in Canvas ~~ Fast, Lightweight, High Performance

Utilities
Launch
A

Anime

JavaScript animation engine

Design
Launch
F

Framer-ground

Elevate your web projects with fine, small animated components

Utilities
Launch
L

LottieFiles

Interactive animations in many formats like json,gif and mp4

Photo & Video
Launch
M

Motion Canvas

Visualize Your Ideas With Code

Developer Tools
Launch

Canvas Confetti FAQ

What is canvas-confetti?

A browser library that draws confetti animations on a canvas.

How do I install it?

Install it from npm and import it into your build, or include it directly in a page from a CDN.

Does it work on the server?

No. The README says it is a client component and will not run in Node.

Can I respect reduced motion?

Yes. Set disableForReducedMotion so the animation is skipped for visitors who prefer reduced motion.

Can I use my own shape?

Yes. shapeFromPath lets you build a shape from an SVG path with an optional matrix.

What does confetti return?

A Promise that resolves when the animation is done, or null in browsers without Promise support.

What are the best Canvas Confetti alternatives?

Popular alternatives to Canvas Confetti include Sparticles, Framer-ground and HypnoticCanvas. See all Canvas Confetti alternatives

Developer Stuff

Badges