Neon Flicker Text
Light a word tube by tube, with a mains hum that never quite settles. Install with npx remotion-ui@latest add neon-flicker-text.
PrimitivePrimitives
$ npx remotion-ui@latest add neon-flicker-textA neon sign starting the way neon actually starts.
import { NeonFlickerText } from "@/remotion/primitives/neon-flicker-text";
<NeonFlickerText
text="Open all night"
order="random"
glowColor="#f472b6"
staggerInFrames={5}
/>A gas-discharge model, not random opacity
Three things separate this from Math.random() on opacity:
- An unlit tube is still there as cold glass (
offColor), not invisible. - The strike probability climbs across each character's own window, so the sign resolves instead of sputtering forever.
- A lit tube keeps a mains hum and an occasional stutter.
That last one matters more than it sounds. A settled state with no hum is what makes a neon effect look like a static PNG two seconds in.
Tuning
hum is the depth of the idle breathe and buzz is the chance per beat that a
settled tube drops out. glowSize is the halo radius in px at full brightness;
the glow is four stacked shadows, so it stays soft at large sizes instead of
banding.
order="random" is the natural fit — tubes in a real sign do not strike left to
right — and the shuffle is seeded, so the same seed renders the same order
everywhere.
Going out
exit stutters the tubes back off rather than fading them, because an exit is
not an entrance played backwards. Set flickerOnExit={false} for a clean fade.
A gas-discharge model: unlit tubes are still cold glass, strike probability climbs so the sign resolves, and a lit tube keeps a hum. A settled state with no hum looks like a PNG.
Agent notes
Install first, then import the copied source component locally. AI guide →
@/remotion/primitives/neon-flicker-text- Use when: frame-level motion primitives and reusable animation wrappers.
- Customize: text, glowColor, glowSize, offColor, plus copied source for timing, layout, colors, and typography.
- Rule: do not import this component from the
remotion-uinpm package; it is copied into your project.
Usage
import { NeonFlickerText } from "@/remotion/primitives/neon-flicker-text";
<NeonFlickerText text="Open all night" order="random" glowColor="#f472b6" />API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | - | The sign. |
| glowColor | string | "#f472b6" | Colour of the halo around the tube. |
| glowSize | number | 26 | Halo radius in px at full brightness. Four stacked shadows, so it stays soft. |
| offColor | string | faint pink | The tube with no gas lit — cold glass, not invisible. |
| offLevel | number | 0.14 | Brightness of an unlit tube, 0–1. |
| hum | number | 0.12 | Depth of the mains hum once the sign has settled. |
| buzz | number | 0.06 | Chance per beat that a settled tube stutters. 0 disables it. |
| flickerOnExit | boolean | true | Stutter back off instead of fading cleanly. |
| order | "start" | "end" | "center" | "edges" | "random" | "start" | Which tube strikes first. `random` is the natural fit. |
| staggerInFrames | number | 2 | Frames between one tube striking and the next. |
| durationInFrames | number | 20 | Length of one tube's ignition. Longer sputters more. |
| seed | number | 1 | Seeds the flicker and `order="random"`. |
| exitAtInFrames | number | - | Frame the sign starts cutting out on. |