Skip to content

Neon API

Neon

Extends Effect.

Factory Function

typescript
createNeon(config?: NeonConfig)

Methods

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


NeonConfig

typescript
interface NeonConfig {
    count?: number;
    speed?: number;
    colors?: string[];
    flicker?: boolean;
    scale?: number;
}
PropertyTypeDefaultDescription
countnumber8Number of neon tubes rendered.
speednumber1Animation speed multiplier.
colorsstring[]['#ff0080', '#00ffff', '#ffff00', '#ff6600', '#aa00ff']Array of CSS color strings for the neon tubes.
flickerbooleantrueWhether tubes randomly flicker on and off.
scalenumber1Scales tube sizes proportionally.