Components
Dot Spotlight Hero
Interactive dot grid background with mouse-tracking comet trail. Velocity maps color from cyan to azure.
Dot Spotlight Hero
Interactive dot grid hero background extracted from the Vandoko AI site. Mouse movement creates a luminous comet trail that maps velocity to color — cyan at rest, azure at speed. Canvas-based for 60fps performance with quadratic distance falloff and additive screen blending.
Preview
Loading preview...
Installation
Terminal
$npx shadcn@latest add @vandoko/vdk-dot-spotlightUsage
import { VdkDotSpotlight } from "@/components/vdk-dot-spotlight";
export default function HeroSection() {
return (
<VdkDotSpotlight className="min-h-[600px]" spotlightRadius={150}>
<div className="flex h-full items-center justify-center">
<h1 className="text-5xl font-bold">Your headline here</h1>
</div>
</VdkDotSpotlight>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Content rendered above the dot grid |
className | string | — | Additional CSS classes |
dotSize | number | 1 | Dot core radius in pixels |
dotSpacing | number | 24 | Distance between dot centers |
trailLifetime | number | 700 | Trail fade duration in ms |
trailLength | number | 50 | Max stored trail points |
spotlightRadius | number | 120 | Glow radius around cursor |
Features
- Canvas rendering — 60fps dot trail via Canvas 2D API with DPR scaling
- Velocity color mapping — Cyan (186°) at rest → azure (225°) at speed
- Static dot grid — CSS radial-gradient base layer with oklch muted-foreground
- Screen blend — Additive color blending for natural glow
- Responsive — ResizeObserver keeps canvas matched to container
- Zero dependencies — Only React, no animation libraries needed
Lineage
| Property | Value |
|---|---|
| Source | @vandoko-ai/dot-spotlight-bg |
| Version | 0.0.1 |
| Curated | 2026-04-06 |
| License | MIT |
| Dependencies | None |
Modifications
- Extracted from vandoko-ai-site DotSpotlightBg component
- Exported props interface as VdkDotSpotlightProps
- Static dot grid converted from hsl() to oklch() token
- Renamed component to VdkDotSpotlight for registry namespace