Skip to content

Snow API

Snow

Extends Effect.

Factory Function

typescript
createSnow(config?: SnowConfig)

Methods

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


SnowConfig

typescript
interface SnowConfig {
    fillStyle?: string;
    particles?: number;
    scale?: number;
    size?: number;
    speed?: number;
}
PropertyTypeDefaultDescription
fillStylestring'rgb(255 255 255 / .75)'CSS color string for the snowflake fill.
particlesnumber200Number of snowflakes. Automatically halved on small screens.
scalenumber1Scales all snowflake sizes proportionally.
sizenumber9Maximum snowflake radius in pixels (before scale).
speednumber1Fall speed multiplier.