Skip to content

Balloons API

Balloons

Extends Effect.

Factory Function

typescript
createBalloons(config?: BalloonsConfig)

Methods

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


BalloonsConfig

typescript
interface BalloonsConfig {
    count?: number;
    colors?: string[];
    sizeRange?: [number, number];
    speed?: number;
    driftAmount?: number;
    stringLength?: number;
    scale?: number;
}
PropertyTypeDefaultDescription
countnumber15Number of balloons. Automatically halved on small screens.
colorsstring[]['#ff4444', '#4488ff', '#44cc44', '#ffcc00', '#ff88cc', '#8844ff']Balloon fill colors (hex strings).
sizeRange[number, number][25, 45]Min/max balloon radius in pixels (before scale).
speednumber1Rise speed multiplier.
driftAmountnumber1Horizontal drift intensity multiplier.
stringLengthnumber1String length multiplier.
scalenumber1Scales all sizes proportionally.