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

minimal-snow

v1.0.1

Published

A lightweight, high-performance snow effect as a Web Component and Library.

Readme

Minimal Snow ❄️

A lightweight, high-performance, and framework-agnostic snow effect for the web.

This library creates a smooth, canvas-based snow animation that overlays your website. It is designed to be zero-dependency and easy to integrate into any project, whether you are using React, Vue, Angular, Svelte, or just Vanilla HTML/JS.

Note: The visual style and physics of this effect were inspired by the winter easter egg found in Google AI Studio.

Features

  • 🚀 Zero Dependencies: Extremely lightweight (< 2KB minified).
  • High Performance: Uses HTML5 Canvas and requestAnimationFrame for 60FPS animations.
  • 🎨 Theme Aware: Automatically detects dark/light mode (or can be manually configured).
  • 🧩 Web Component: Works instantly with a simple HTML tag <snow-effect>.
  • 🔧 TypeScript: Fully typed for better development experience.

Installation

Option 1: NPM (Recommended for Bundlers)

npm install minimal-snow

Option 2: CDN (Easiest for HTML)

Simply add this script to your <head> or body. It automatically registers the Web Component.

<script src="https://unpkg.com/minimal-snow@latest/dist/minimal-snow.umd.js"></script>

Usage

1. Using the Web Component (HTML)

Once the script is loaded (via CDN or import), you can use the custom element anywhere.

<!-- Auto-start the snow with default settings -->
<snow-effect running></snow-effect>

<!-- Customize particle count and force a specific theme -->
<snow-effect running count="5000" theme="dark"></snow-effect>

Controlling via JavaScript

const snow = document.querySelector('snow-effect');

// Toggle the effect on/off
snow.toggle();

// Stop the effect (fades out)
snow.stop();

// Change particle count dynamically
snow.setAttribute('count', '1000');

2. Using with Frameworks (NPM)

You can import the SnowEngine class for full programmatic control, or use the Web Component wrapper.

React

import { useEffect, useRef } from 'react';
import { SnowEngine } from 'minimal-snow';

export default function App() {
  const snowRef = useRef<SnowEngine | null>(null);

  useEffect(() => {
    // Initialize the engine attached to the document body
    snowRef.current = new SnowEngine(document.body, { 
      count: 1500,
      colorDark: 'white',
      colorLight: '#a0d8ef'
    });

    // Clean up on unmount
    return () => snowRef.current?.destroy();
  }, []);

  return (
    <button onClick={() => snowRef.current?.toggle()}>
      Toggle Snow
    </button>
  );
}

Vue 3

<script setup>
import { onMounted, onUnmounted } from 'vue';
import { SnowEngine } from 'minimal-snow';

let snow = null;

onMounted(() => {
  snow = new SnowEngine();
});

onUnmounted(() => {
  if (snow) snow.destroy();
});
</script>

<template>
  <button @click="snow.toggle()">Let it snow!</button>
</template>

Angular

Import the library in your component or module to register the web component.

import 'minimal-snow'; // Registers <snow-effect>

Then use it in your template. Note: You may need CUSTOM_ELEMENTS_SCHEMA in your module.

<snow-effect [attr.running]="isSnowing ? '' : null"></snow-effect>

API Documentation

<snow-effect> Attributes

| Attribute | Type | Default | Description | |-----------|------|---------|-------------| | running | Boolean | false | Presence of this attribute starts the animation. Removing it stops it. | | count | Number | 2000 | The number of snow particles to render. | | theme | String | auto | Force particle color. Values: dark, light. Default detects system preference. | | z-index | Number | 9999 | The CSS z-index of the canvas overlay. |

SnowEngine Class options

const snow = new SnowEngine(containerElement, options);

| Option | Type | Default | Description | |--------|------|---------|-------------| | count | number | 2000 | Number of particles. | | colorDark | string | "white" | Color used when dark mode is detected. | | colorLight | string | "#add8e6" | Color used when light mode is detected. | | zIndex | number | 9999 | Z-index for the canvas element. |


License

MIT License © 2025

This project is open source. You are free to use it in personal and commercial projects.