Colorful Snowfall Effect In JavaScript – snow.js

Category: Animation , Javascript | October 23, 2021
Author:radkinz
Views Total:4,599 views
Official Page:Go to website
Last Update:October 23, 2021
License:MIT

Preview:

Colorful Snowfall Effect In JavaScript – snow.js

Description:

snow.js is a JavaScript library that applies a unique snowfall effect to your webpage.

How to use it:

1. Download and import the snow.js.

import * as Snow from './snow.js'

2. Create a container on which the snowfall effect will render.

<div id="snow"></div>

2. Create a new instance of the snow.js and config the snowfall effect with the following parameters:

  • id: unique id of the container element
  • theme: berry, pastel, purple, or any colors
  • min_size: min size of snowflakes
  • max_size: max size snowflakes
var snow = new Snow.default({
    id: 'snow',
    theme: 'berry',
    min_size: 1,
    max_size: 5
});

3. Start the snowfall effect.

snow.start();

4. Toggle the snowfall effect.

snow.toggle();

You Might Be Interested In:


Leave a Reply