Tubes Cursor
A bundle of glowing 3D neon tubes that chases the pointer with fluid inertia, smooth spline curvature, and soft bloom. Clicking randomizes the palette.
Installation#
pnpm dlx shadcn@latest add @davinciui/tubes-cursorUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
tubeColorsTube body colors sampled along the bundle. Updates live. | string[] | ["#5e72e4", "#8965e0", "#f5365c"] |
lightColorsFour point-light colors tinting the tubes and bloom. Updates live. | string[] | ["#21d4fd", "#b721ff", "#f4d03f", "#11cdef"] |
lightIntensityIntensity of the point lights. Updates live. | number | 200 |
themeColor scheme. Auto follows the site theme live; light renders bloom-free over transparency. | "auto" | "light" | "dark" | "auto" |
tubeCountNumber of tubes in the bundle. Applied on init. | number | 16 |
bloomThresholdBloom threshold. Applied on init. | number | 0 |
bloomStrengthBloom strength. Applied on init. | number | 1.5 |
bloomRadiusBloom radius. Applied on init. | number | 0.5 |
randomizeOnClickClicking the interaction area generates a new tube and light palette. | boolean | true |
idleMotionAmbient drift while the pointer is outside the canvas. False parks the bundle at center. Applied on init. | boolean | true |
qualityRendering detail and DPR cap. Updates live. | "low" | "medium" | "high" | "high" |
zIndexOverlay stacking order. | number | 10 |
disabledTurns the decorative overlay off without unmounting it. | boolean | false |
containerRefOptionally constrain pointer tracking and rendering to a positioned host. | RefObject<HTMLElement> | — |
classNameAdditional class name applied to the overlay wrapper. | string | — |
childrenContent layered above the effect. | ReactNode | — |
Accessibility#
The WebGL overlay is aria-hidden and pointer-events none, so it exposes nothing to assistive tech and takes no focus or keyboard input. It is purely decorative; interactive content must sit above it.
Motion#
The engine animates tubes chasing the pointer with inertia and bloom; idleMotion controls ambient drift and clicks can randomize colors. No timing props exist, and prefers-reduced-motion is checked once at mount, skipping the renderer entirely.
Known constraints#
- Requires WebGL for the tube renderer.
- Reduced motion returns before the animation loop starts, so the effect is skipped entirely.
- The canvas is decorative; interactive content still needs normal hover and focus feedback.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

