Skip to content

Sandstorm API

Sandstorm

Extends Effect.

Factory Function

typescript
createSandstorm(config ? : SandstormConfig)

Methods

See Effect for the full method reference: mount(), start(), pause(), resume(), configure(), withFade(), and destroy().


SandstormConfig

typescript
interface SandstormConfig {
    count?: number;
    wind?: number;
    turbulence?: number;
    color?: string;
    hazeOpacity?: number;
    scale?: number;
}
PropertyTypeDefaultDescription
countnumber300Number of sand grains. Halved on small screens.
windnumber1Horizontal wind strength multiplier.
turbulencenumber1Chaotic movement intensity.
colorstring'#c2956b'CSS color string for sand and haze.
hazeOpacitynumber0.15Opacity of the atmospheric haze overlay (0-1).
scalenumber1Scales grain sizes proportionally.