DS0
Components

Confetti

A celebratory confetti animation triggered on user achievements, milestone completions, or special events.

Overview

Confetti fires a particle animation from a point or across the viewport. Use it to celebrate form submissions, achievements, purchases, or milestone events.

Usage

<Confetti trigger={showConfetti} />

Imperative API

const confettiRef = useRef();
confettiRef.current?.fire();

<Confetti ref={confettiRef} />
<Button onClick={() => confettiRef.current?.fire()}>Celebrate!</Button>

API Reference

PropTypeDefaultDescription
triggerbooleanfalseFire confetti when true
particleCountnumber100Number of particles
spreadnumber70Spread angle in degrees
origin{ x: number, y: number }{ x: 0.5, y: 0.5 }Origin point (0–1)
colorsstring[]Brand colorsParticle colors

Accessibility

  • Animation respects prefers-reduced-motion
  • No focusable elements — purely decorative

On this page