Skip to content

NeonFlicker

The NeonFlicker text effect emulates faulty neon sign illumination by staggering fast irregular cycles of opacity and text-shadow glow scaling on text units before fading into a stable, glowing state.


Slow Warm Neon Flicker

The color option defines the active neon text shadow color. flickers configures the count of rapid ignition cycles before settling.

MOTEL_SIGN

60 FPS

Fast Cold Neon Ignition

Setting a smaller flickers count and a narrower stagger timing triggers a quick, high-speed neon light ignition.

LAB_VACANCY

60 FPS

Severe Faulty Connection

Reducing dimOpacity to near-zero levels simulates a highly unstable power supply, causing letters to fade almost completely out of view during flickering cycles.

FAULTY_PWR

60 FPS

Word-Level Neon Flicker

Applying the flicker effect to word tokens (setting type: 'words') causes complete words to ignite in unified groups.

PINK FLICKER

60 FPS

Ambient Pulse Loop Integration

By appending subsequent tweens to the returned timeline, target elements can transition into an infinite ambient breathing pulse after initial flicker.

PULSE_GLOW

60 FPS

API Reference

javascript
import { neonFlicker } from 'animx/plugins/Text'

const tl = neonFlicker(target, config)

Configuration Options

OptionDefaultDescription
type'chars'Slicing layout unit: 'chars', 'words', or 'lines'.
color'#ff0055'Glow text shadow color format (hex/rgba).
dimOpacity0.2Minimum opacity ceiling during off-state flickers.
flickers6Count of rapid flicker steps before stabilization.
flickerDuration0.08Lifespan in seconds of each individual flicker interval.
stagger0.08Stagger delay between adjacent text units in seconds.
duration0.4Duration of the final stable glow fade-in in seconds.
ease'quad.out'Deceleration profile applied during final glow stabilization.
revertOnCompletefalseResets layout and removes absolute spans on complete.
pausedfalseStandard playback initialization lock flag.