# canvas-confetti

> Fire performant confetti from any point on the page with one function call.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/canvas-confetti

free

Fire performant confetti from any point on the page with one function call.

by Kiril Vatev[GitHub](https://github.com/catdad/canvas-confetti)[npm](https://npmjs.com/package/canvas-confetti)

[visit](https://www.kirilv.com/canvas-confetti/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://www.kirilv.com/canvas-confetti/](https://www.kirilv.com/canvas-confetti/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Sonner](https://tastebase.ehsanulsiam.workers.dev/browse/sonner)

Opinionated toast component with stacking, swipe to dismiss and promise toasts; ports for Vue, Svelte, Solid and Angular.

no preview

### [Lenis](https://tastebase.ehsanulsiam.workers.dev/browse/lenis)

Smooth, inertia-based wheel scrolling that keeps native scroll position, sticky and anchors working.

no preview

### [Glisse](https://tastebase.ehsanulsiam.workers.dev/browse/glisse)

A faithful web implementation of Apple's Liquid Glass: refracting buttons, switches, tab bars and menus.

no preview

### [Liquid Glass React](https://tastebase.ehsanulsiam.workers.dev/browse/liquid-glass-react)

A single <LiquidGlass> wrapper that adds refraction, chromatic aberration and elastic hover to any content.

## For your agent

##### Install

`npm i canvas-confetti && npm i -D @types/canvas-confetti`

##### Use it for

- a genuine milestone: first project created, payment completed, course finished
- a celebration in onboarding or a game: a streak hit, a level up, a goal reached

##### Skip it when

- routine actions (saving, sending a message): celebration loses meaning fast
- corporate, luxury, brutalist or minimal products where it clashes with the tone
- error-adjacent flows or anything serious (finance transfers, medical, deletion)

##### What's inside16 free

- confetti()
- confetti.create
- confetti.reset
- confetti.shapeFromPath
- confetti.shapeFromText
- Reduced motion (disableForReducedMotion)
- Basic Cannon
- Random Direction
- Realistic Look
- Fireworks
- Stars
- Snow
- School Pride
- Custom Shapes
- Emoji
- Custom Canvas

##### Facts

**Frameworks**
vanilla, react, vue, svelte, solid, angular

**Styling**
unstyled

**Weight**
small

**Accessibility**
ok

**Maturity**
established

**License**
ISC

**Price**
Free

##### Pairs with

[Sonner](https://tastebase.ehsanulsiam.workers.dev/browse/sonner)

```
import confetti from 'canvas-confetti'

confetti({ particleCount: 80, spread: 70, origin: { y: 0.7 }, disableForReducedMotion: true })
```

https://www.kirilv.com/canvas-confetti/

Loading website

[Visit](https://www.kirilv.com/canvas-confetti/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
