A React confetti component that fires a canvas burst on click - for success screens, checkouts and sign-ups.
Confetti playground
Install Confetti
1. New project? One command installs the package and wires everything - see Installation:
pnpm dlx zyncat-ui init2. Import the component - it loads its own stylesheet:
import { Confetti } from '@zyncat/ui/confetti';Usage
import { Confetti, type ConfettiHandle } from '@zyncat/ui/confetti'; const confetti = useRef<ConfettiHandle>(null); <Confetti ref={confetti} field="viewport" /><Button onClick={() => confetti.current?.fire()}>Celebrate</Button>Compose Confetti in your application. No Tailwind or external styling library is required; every value resolves from Zyncat UI's token vocabulary.
Confetti props
Confetti
ConfettiFireOptions
ConfettiHandle
ConfettiStyle
Frequently asked questions
A confetti animation is a celebration effect that throws coloured paper across the screen and lets it tumble and fall. This one is a canvas particle simulation: every piece gets its own drag, lift, gravity, spin and flip across three depth layers, so it settles like real paper rather than looping a fixed animation.
It is a live canvas animation, not a confetti GIF, Lottie file or transparent overlay video. Nothing is downloaded and nothing is pre-rendered: the pieces are simulated per frame in a <canvas> element, so the burst is a different shape every time and stays sharp at any screen size or pixel density.
No - this is a React component for the web, so it runs on a page, not inside a slide deck. PowerPoint and Google Slides need an animated GIF or a video file; if you want confetti on a website, a landing page or a success screen instead, this component is the one to use.
Yes. It is a React 19 component with zero runtime dependencies and no Tailwind, so it drops into Next.js as-is. With field="viewport" the canvas is portalled to document.body after hydration and renders nothing on the server; with the default field="container" it fills the nearest positioned ancestor.
count sets the pieces one burst sends (1-520, default 170) and duration is how long the emitter stays open in seconds - 0.15 reads as one shove, 2.5 tapers into a fall. Colours are CSS custom properties on the canvas: set --confetti-paper-1 through --confetti-paper-5, plus --confetti-weights, --confetti-gloss and --confetti-shade to retune the palette.