Skip to content

Lava API ​

Lava ​

Extends Effect.

Factory Function ​

typescript
createLava(config?: LavaConfig)

Methods ​

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


LavaConfig ​

typescript
interface LavaConfig {
    count?: number;
    speed?: number;
    colors?: string[];
    scale?: number;
}
PropertyTypeDefaultDescription
countnumber12Number of lava blobs. Automatically reduced on small screens.
speednumber1Movement speed multiplier for blob floating motion.
colorsstring[]['#ff4400', '#ff8800', '#ffcc00', '#ff0066']Array of CSS color strings for the lava blobs.
scalenumber1Scales all blob radii proportionally.