This library is not production-ready yet. Developers should use it with caution and expect breaking changes.

Snow

Falling snowflakes effect with gentle drift and wind.

Installation

First, make sure you have the base map component installed:

npx shadcn@latest add https://www.terrae.dev/map.json

Then install the snow component:

npx shadcn@latest add https://www.terrae.dev/snow.json

Intensity

Control the snowfall intensity with the intensity prop. Higher values create denser snowfall with larger flakes. Create anything from light flurries to heavy blizzards.

Wind

Add wind effects with windSpeed and windDirection. Wind causes snowflakes to drift horizontally as they fall, creating more realistic weather effects.

Custom Colors

Customize the snowflake color with the color prop. Use pure white for classic snow or add a slight blue tint for a colder atmosphere.

Properties

PropertyTypeDefaultDescription
idstringauto-generatedUnique identifier for programmatic control via useSnowControl
intensitynumber1Overall snow intensity (affects density and flake size)
particleCountnumber150Number of snowflakes
colorstring#ffffffSnowflake color (hex)
windSpeednumber0.5Horizontal wind speed
windDirectionnumber0Wind direction in degrees (0 = east)
fallSpeednumber1Vertical fall speed multiplier
autoStartbooleantrueStart animation on mount

Use Cases

Weather Maps

Display current or forecasted snowfall on weather maps

Ski Resort Maps

Add atmospheric snow effects to ski trail maps