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

Sandstorm

Atmospheric sandstorm effect with horizontal particle movement and reduced visibility.

Installation

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

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

Then install the sandstorm component:

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

Intensity

Control the sandstorm intensity with the intensity prop. Higher values create denser particle clouds and reduced visibility. This affects both particle count and the haze overlay.

Wind Direction

Change the wind direction with windDirection (in degrees). Combine with windSpeed to control how fast particles move across the screen.

Custom Colors

Customize the sand color with the color prop. Use darker browns for dust storms or lighter tans for desert sand. Adjust visibility to control the haze intensity.

Properties

PropertyTypeDefaultDescription
idstringauto-generatedUnique identifier for programmatic control via useSandstormControl
intensitynumber1Overall storm intensity (affects density and visibility)
particleCountnumber200Number of sand particles
colorstring#d4a574Sand/dust particle color (hex)
windSpeednumber4Wind speed multiplier
windDirectionnumber0Wind direction in degrees (0 = east, 90 = south)
visibilitynumber0.3Haze/visibility reduction (0-1)
turbulencenumber0.5Particle wobble/turbulence amount
autoStartbooleantrueStart animation on mount

Use Cases

Weather Visualization

Display dust storms and sandstorms on weather maps

Desert Environments

Add atmospheric effects to desert region maps