NeuralPathways

svganimationbackground

Dual-waist light-stream lens with living fog

Two duotone wings of light filaments whip inward and pinch through a glowing lens, over procedural scene-lit fog. Pure SVG geometry + CSS motion + one WebGL fog pass — zero dependencies, reduced-motion aware.

Playground

Websites that stop the scroll.

Tweak the props in the toolbox — the preview updates in realtime. “Copy code” gives you the exact JSX for the current tweaks.

Installation

Requires the shadcn CLI. Run this from your project root — it writes the component source, then you import and go.

bash
npx shadcn@latest add "https://webcules.com/r/neural-pathways.json"

The command installs the component source (plus its engine / type files when the component ships one). No other dependencies — everything is dependency-free canvas, SVG and CSS.

Usage

Import the component and drop it in — every prop in the toolbox is a regular React prop:

hero.tsx
import { NeuralPathways } from "@webcules/ui/components/ui/neural-pathways";
export function Hero() {
return (
<section className="relative h-screen overflow-hidden">
<NeuralPathways className="absolute inset-0" />
<div className="relative z-10 flex h-full flex-col items-center justify-center text-white">
<h1>Websites that stop the scroll.</h1>
</div>
</section>
);
}

Highlights

  • Dual-waist light-stream lens: duotone filament wings whip inward and pinch through a glowing core
  • Procedural fog banks (WebGL FBM) lit by the wing colors — SVG turbulence fallback when WebGL is unavailable
  • Pure SVG geometry + CSS motion: zero runtime dependencies, deterministic rendering
  • aria-hidden and purely decorative — sit your content on top of it

Example — Aurora recolor

Emerald top wing, violet bottom wing, stronger blend near the lens.

example.tsx
<NeuralPathways
primary="#34d399"
secondary="#a78bfa"
crossTint={0.4}
cloudTint="#cdb9f5"
/>

Example — Calm continuous lines

Set pulseLines={false} for solid continuous strands — the traveling whip-wave and fog carry the motion instead.

example.tsx
<NeuralPathways pulseLines={false} zoom={0.4} cloudPosition="bottom" />

Props

PropTypeDefaultDescription
primarystring"#f5b04c"Stream color of the two top wings.
secondarystring"#3fb6ff"Stream color of the two bottom wings.
crossTintnumber0.35How much the opposite color bleeds into strands near the lens (0–1).
streamCountnumber18Filament strands per wing.
heroStrandsnumber3Thicker, brighter strands per wing.
thicknessnumber1Stroke width multiplier.
spreadnumber0.135Fan width of the bundle at the corners.
waveAmpnumber0.5Traveling whip-wave amplitude (0 = straight strands).
waveFreqnumber2.2Whip-wave frequency along each strand.
zoomnumber1Warp throttle: light pulses + particle speed. 0 = still.
pulseLinesbooleantrueBright pulses racing along the strands. false = solid lines.
glownumber1Bloom strength.
speednumber1Global motion multiplier.
focalXnumber0.5Lens center X, 0–1 of the canvas.
focalYnumber0.535Lens center Y, 0–1 of the canvas.
lensGapnumber0.075Vertical gap between the two waists.
particleDensitynumber1Sparks streaming into the lens (0–2).
particleSizenumber1Spark size multiplier.
starDensitynumber1Background dust field count.
starSizenumber1Background dust size multiplier.
showCloudsbooleantrueFog layer on/off.
cloudDensitynumber0.8Fog density.
cloudSpeednumber1Fog drift speed.
cloudPosition"corners" | "bottom" | "top" | "veil""corners"Where the fog banks sit.
cloudTintstring"#a8c0dd"Base fog color (lit gold/blue by the waists).
seednumber7Deterministic variation — re-roll the fan.
bgTopstring"#04060d"Sky gradient top color.
bgMidstring"#0a1024"Sky gradient mid color (at 62% height).
bgBottomstring"#101a38"Sky gradient bottom color.

Notes

  • Under prefers-reduced-motion it renders one settled static frame instead of animating.
  • Strand geometry is computed once per size (ResizeObserver), all line motion is CSS/SMIL, and the fog is a half-resolution WebGL pass — no per-frame JS on the main thread.
  • Fog needs WebGL; without it the component falls back to SVG turbulence clouds with the same API.
  • Pauses on hidden tabs.
NeuralPathways — Webcules Components