Ben Borgers

How to add falling snow to a website with JavaScript

February 1, 2021

I wanted to add a snowing animation to my website, but I didn’t want to code it myself. Instead, I found a nice package called let-it-go to do it for me.

Just install the package:

npm i let-it-go

And then start the confetti:

import { LetItGo } from 'let-it-go'

new LetItGo({
    color: '#94a3b8'
    /* color is optional (the snow is white by default),
       but since my website was white I needed gray snow for contrast */

There’s more options for stopping and styling the snow in the let-it-go docs.

Subscribe to my newsletter!

A weekly round-up of new blog posts and updates to projects I’m working on.