@tehnoskarb/xn-snowflakes
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

xn-snowflakes

Add beautiful falling down snowflakes to any of the elements container (or fullscreen) in your webpage.

Complete JavaScript / TypeScript support.

Demo

Demo on stackblitz

Installation

Add npm package

npm i xn-snowflakes

Import package into your code

// ES6 style
import { Snowflakes } from 'xn-snowflakes';

// commonjs style
const Snowflakes = require('xn-snowflakes');

Usage

// add snowflakes to the whole webpage
const snowFull = new Snowflakes();

// start fullscreen snow fall
snowFull.start();

// stop fullscreen snow fall
snowFull.pause();


// add snowflakes to a container with extra customisations
const target = document.getElementById('mydiv');
const snow = new Snowflakes(target);

// change snowflake color (default #ffffff)
snow.color = '#bfeaff';

// change snow volumn to make it a storm (default 300)
snow.count = 1000;

// start the snow fall
snow.start();

// stop the snow fall
snow.pause();

Package Sidebar

Install

npm i @tehnoskarb/xn-snowflakes

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

13.9 kB

Total Files

9

Last publish

Collaborators

  • garik_kh