Components

Confetti

A burst of paper from any element, point or the middle of the screen: pieces flutter, tumble, slow in the air and fall, then the canvas cleans itself up. One function, no component to mount.

Paste it into ChatGPT, Claude, Cursor or v0.
count90
spread70
power1.0

Usage

React
import { confetti } from '@vizzele/react';

<button onClick={(e) => confetti(e.currentTarget)}>Publish</button>

// Anywhere, with options — resolves when the last piece lands.
await confetti({ x: 200, y: 120 }, { count: 140, spread: 120, power: 1.4 });

Props

PropTypeDefaultDescription
originElement | { x, y }—Where it bursts from. Default the middle of the screen.
countnumber90Pieces of paper.
spreadnumber70Cone width in degrees.
anglenumber-90Direction in degrees (−90 is up).
powernumber1Launch speed.
colorsstring[]—Defaults to the iridescent palette.

Accessibility

  • Purely decorative: the canvas is aria-hidden and ignores the pointer.
  • With reduced motion nothing is drawn — announce the success in text as well.