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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-christmas-effects

v1.0.10

Published

Christmas snow and firecracker effects for React (December only)

Downloads

1,151

Readme

🎄 react-christmas-effects ❄️🎆

Add elegant Christmas snowfall, one-time greeting text, and a single firecracker burst to your React app — automatically shown only in December.

Built with Framer Motion for smooth, accessible animations.

✔ Lightweight ✔ Elegant (no noisy animations) ✔ December-only by default ✔ Text & firecracker shown once ✔ Works with Vite, CRA, Next.js (client-side)


✨ Demo

❄️ Snow falling continuously 🎄 Greeting text fades in once 🎆 Firecracker bursts once

Automatically active from December 1st → December 31st


📦 Installation

npm install react-christmas-effects

or

yarn add react-christmas-effects

or

pnpm add react-christmas-effects

🎨 IMPORTANT: Import CSS

You must import the bundled CSS once in your app:

import "react-christmas-effects/dist/index.css";

This is required for layout and styling.


🚀 Basic Usage

import { ChristmasEffects } from "react-christmas-effects";
import "react-christmas-effects/dist/index.css";

function App() {
  return <ChristmasEffects />;
}

export default App;

That’s it 🎉 Your app will now show Christmas effects only in December.


🧪 Force Enable (for testing)

To preview effects outside December:

<ChristmasEffects force />

🎛️ Props API

<ChristmasEffects />

| Prop | Type | Default | Description | | ---------------- | --------- | ------------------------- | --------------------------------------- | | text | string | "🎄 Merry Christmas 🎄" | Greeting text shown once | | snowflakeCount | number | 200 | Number of falling snowflakes | | showText | boolean | true | Show / hide greeting text | | fireworks | boolean | true | Enable one-time firecracker burst | | startDay | number | 1 | Start day in December | | endDay | number | 31 | End day in December | | force | boolean | false | Force enable regardless of current date |


🎨 Examples

Custom Text

<ChristmasEffects text="🎅 Happy Holidays 🎅" />

Reduce Snow

<ChristmasEffects snowflakeCount={100} />

Disable Firecrackers

<ChristmasEffects fireworks={false} />

Show Only Until Christmas Day

<ChristmasEffects endDay={25} />

Minimal Setup (Snow Only)

<ChristmasEffects showText={false} fireworks={false} />

🧠 How It Works

  • Uses react-snowfall for snow ❄️
  • Uses canvas-confetti for firecracker 🎆
  • Uses Framer Motion for smooth text animation
  • Text & firecracker run only once per page load
  • Snow runs continuously
  • Automatically disables outside December
  • Uses position: fixed overlay
  • Does not block user interaction (pointer-events: none)

⚛️ Framework Compatibility

| Framework | Supported | | --------- | -------------------- | | React | ✅ | | Vite | ✅ | | CRA | ✅ | | Next.js | ✅ (client-side only) | | Remix | ✅ (client-side) |

⚠️ For Next.js, render inside a client component.


♿ Accessibility & Performance

✔ Respects prefers-reduced-motion ✔ No event listeners on DOM ✔ No layout shift ✔ Lightweight canvas effects ✔ Safe for production use


🐛 Troubleshooting

Effects not visible?

  • Ensure CSS is imported:

    import "react-christmas-effects/dist/index.css";
  • Check z-index conflicts

  • Ensure component renders on client side

Firecracker not firing?

  • Runs only in browser (not SSR)
  • Fires only once per page load

📄 License

MIT © 2025 Free to use in personal and commercial projects.


🌟 Contributing

PRs are welcome!

Ideas:

  • 🎆 New Year mode
  • 🔊 Optional sound effects
  • 🎨 Theme customization
  • 🌙 Dark mode variants

❤️ Support

If you like this package, please ⭐ the GitHub repo and share it with the community 🎄✨


Happy Coding & Merry Christmas! 🎅❄️🎆