Party Popper

Confetti celebration effect on click. Wraps any trigger element and fires particles on interaction.

Component

Installation

pnpm dlx shadcn@latest add "https://pulkitxm.com/components/party-popper.json"

Usage

Import

Add the PartyPopper import.

import { PartyPopper } from "@/components/party-popper";

Use

Wrap any clickable element.

<PartyPopper>
  <Button>Celebrate</Button>
</PartyPopper>;

Guidelines

  • Wrap any clickable element (button, icon, div) as children.
  • Particles emit from the center of the trigger element.
  • Respects prefers-reduced-motion; no animation when the user has reduced motion enabled.

Props

PropTypeDefaultDescription
childrenReact.ReactNodeThe clickable trigger element.
classNamestringAdditional CSS classes for the trigger wrapper.
particleCountnumber12Number of circular/square particles to emit.
streamerCountnumber4Number of streamer particles to emit.
direction"center" | "up" | "down" | "left" | "right""center"Direction particles fly. "center" spreads in all directions; others aim in a focused cone.

Examples

Basic

Wrap a button to trigger confetti on click.

import { PartyPopper } from "@/components/party-popper";
import { Button } from "@/components/ui/button";

export function PartyPopperBasic() {
  return (
    <PartyPopper>
      <Button>Celebrate</Button>
    </PartyPopper>
  );
}

Direction

Use the direction prop to aim particles. Options: "center" (default), "up", "down", "left", "right".

import { PartyPopper } from "@/components/party-popper";
import { Button } from "@/components/ui/button";

export function PartyPopperDirectionUp() {
  return (
    <PartyPopper direction="up">
      <Button>🎉 Fire Up</Button>
    </PartyPopper>
  );
}

Made with ❤️ by Pulkit & Cursor :)

© 2026 Pulkit. All rights reserved

DMCA Verified

Last updated: