About
Confetti animation on click
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Confetti to your project and fits it to your theme.
Code
How Confetti is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { Button } from "@/components/ui/button";
import { Confetti } from "@/components/ui/motion-confetti";
import * as React from "react";
export default function ConfettiDemo() {
const confettiRef = React.useRef<{ fire: () => void }>(null);
return (
<div className="relative flex h-screen w-full items-center justify-center bg-background">
<Button onClick={() => confettiRef.current?.fire()}>Celebrate</Button>
<Confetti ref={confettiRef} />
</div>
);
}








