07.19 · Ambient & Background

Snow / Rain

Snow drifts down, or rain falls in streaks, over a dark town. Best for seasonal pages.

Watch it

It moves by itself. Pause it to look closely, or turn on slow motion to see each part of the movement.

Try it

Change a setting and see the difference as it moves.

Weather

Snow drifts and sways; rain falls fast in streaks.

Amount

How many flakes or drops fall; phones draw fewer.

Wind

Wind carries snow sideways and tilts the rain.

More optionsFewer options

Near flakes and drops are bigger, brighter and faster than far ones.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add falling snow or rain to [the dark section you want it over]. Lay a see-through canvas over the section and draw small particles on it, moving each one down on every frame by the time that has passed, and start it again at the top once it leaves the bottom. Snowflakes fall slowly and sway from side to side; raindrops fall fast and are drawn as short streaks that lean with the wind. When depth is on, make near particles bigger, brighter and faster than far ones. Draw fewer particles on phones. If the visitor has reduced motion turned on, show one still frame. Match the settings listed below.

Replace the words in brackets with your own element. Your settings are added at the end.

Free and open source. If this helped, a star on GitHub helps other people find it.

Star on GitHub

What it is

The full explanation is in README.md.

Good for

  • Winter and holiday pages
  • Weather apps
  • Cozy hero sections
  • Story and game scenes

Avoid on

  • Light pages
  • Long reading pages