npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@any-tdf/react-confetti

v0.0.1

Published

React port of svelte-confetti's pure HTML and CSS confetti effect.

Readme

@any-tdf/react-confetti

React port of [email protected].

The component renders pure HTML and CSS animation markup. It does not use canvas, timers for animation frames, or runtime physics. The goal is API and visual behavior parity with svelte-confetti, with React-only className and style passthrough for integration.

Install

bun add @any-tdf/react-confetti react react-dom

React is supported. The component is SSR-friendly and has no canvas or runtime physics dependency.

import { Confetti } from '@any-tdf/react-confetti';

export const Demo = () => <Confetti rounded amount={100} />;

Documentation

The standalone React documentation app lives beside the package source in packages/react-confetti/docs.

bun install
bun run --filter @any-tdf/react-confetti-site dev
bun run --filter @any-tdf/react-confetti-site build

The site mirrors the demo structure and API coverage from [email protected], with Chinese and English content.

Props

| Prop | Default | Description | | ------------------------- | ------------- | -------------------------------------------------------------------------------------- | | size | 10 | Maximum size in pixels for each confetti piece. | | x | [-0.5, 0.5] | Horizontal range multiplier. [-1, 1] means up to 200px left and right. | | y | [0.25, 1] | Vertical range multiplier. Negative values move downward, positive values move upward. | | duration | 2000 | Animation duration for each piece in milliseconds. | | infinite | false | Loops the animation indefinitely. Overrides iterationCount. | | delay | [0, 50] | Random delay range for each piece in milliseconds. | | colorRange | [0, 360] | HSL hue range used when colorArray is empty. | | colorArray | [] | CSS color values to pick from randomly. Supports gradients and image backgrounds. | | amount | 50 | Number of confetti pieces. Large values can affect performance. | | iterationCount | 1 | CSS animation-iteration-count; accepts numbers, infinite, initial, or inherit. | | fallDistance | "100px" | CSS distance each piece falls after the burst. | | rounded | false | Renders circular pieces. | | cone | false | Shapes the burst as a cone. | | noGravity | false | Uses a constant-speed explosion without the falling stage. | | xSpread | 0.15 | Horizontal spread from 0 to 1. Lower values keep peak and end X positions closer. | | destroyOnComplete | true | Removes the markup after finite animations complete on the client. | | disableForReducedMotion | false | Disables animation when prefers-reduced-motion is active. | | className | "" | Extra class name for the holder element. | | style | undefined | Extra inline styles for the holder element. |

Notes

  • The CSS trajectory, timing variables, gravity behavior, cone behavior, reduced-motion behavior, and default values are based on [email protected].
  • The component is SSR-friendly. Server rendering outputs the same holder and piece markup; client-side cleanup only runs after mount.
  • Random piece values are generated from prop values, not array prop identities, so parent re-renders with equivalent inline ranges do not restart the burst.

Links

License

@any-tdf/react-confetti is released under the MIT License.