Confetti

A confetti burst you call like a toast, from any button.

Preview

"use client";

import { Button } from "@/components/motion/button";
import { confetti } from "@/components/motion/confetti";

export function ConfettiUsage() {
  return (
    <Button onClick={(event) => confetti({ origin: event.currentTarget })}>
      Celebrate
    </Button>
  );
}

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/confetti

Updated