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
Open in
Loading preview...

Installation

Terminal
$npx shadcn@latest add @vandoko/vdk-dot-spotlight

Usage

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

PropTypeDefaultDescription
childrenReactNodeContent rendered above the dot grid
classNamestringAdditional CSS classes
dotSizenumber1Dot core radius in pixels
dotSpacingnumber24Distance between dot centers
trailLifetimenumber700Trail fade duration in ms
trailLengthnumber50Max stored trail points
spotlightRadiusnumber120Glow 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

PropertyValue
Source@vandoko-ai/dot-spotlight-bg
Version0.0.1
Curated2026-04-06
LicenseMIT
DependenciesNone

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

On this page