Back to AIX Effects LibraryQA Verified · Synced
Interactive Components/<CursorSpotlight />·Beginner

Cursor Spotlight

Lightweight wrapper container transforming monochrome feature grids into illuminated spatial workspaces.

Next.js 16+React 19TypeScriptTailwind CSSZero External Deps
Move pointer or tap cells to illuminate hairline grid
01
Pointer Tracking
02
Masked Grid
03
Touch Ready
04
Zero Packages
Beam 280px · Grid 28px

Sweep pointer or tap across grid surface to move beam.

Installation

Zero External Dependencies

Zero external packages needed.

Usage

import { CursorSpotlight } from '@/components/effects/library/interactive/CursorSpotlight'

<CursorSpotlight spotlightSize={280} gridSize={28} showGrid className="p-6">
  <div className="grid grid-cols-2 gap-3">
    <div className="p-4 rounded-xl bg-white/80 dark:bg-black/40">Panel 01</div>
    <div className="p-4 rounded-xl bg-white/80 dark:bg-black/40">Panel 02</div>
  </div>
</CursorSpotlight>

Props & API Reference

4 props
PropTypeDefaultDescriptionEffect
spotlightSizenumber280Spotlight beam diameter in pixels.Resizes beam circle radius.
gridSizenumber28Square coordinate grid step in pixels.Scales structural grid spacing.
showGridbooleantrueToggles coordinate hairline overlay mask.Switches between ambient glow and grid reveal.
spotlightColorstring'rgba(83, 109, 254, 0.24)'Radial illumination color string.Tints spotlight beam.

More in Interactive Components

View All 36 →
R=145px · k=0.14Approach & Click

Magnetic Button

Spring-damped cursor pull pill button featuring decoupled inner text parallax and radial XOR glow.

View Details
Select tabs across uneven label widths
active: overview · stiffness 400

Fluid Navigation Indicator

Dynamic width spring capsule gliding smoothly between navigation tabs via scoped layoutId.

View Details
Hover or swipe edges from all 4 directions
01
Top / Bottom Entry
Cross top or bottom edge
01
Top / Bottom Entry

Vector atan2 slides glass panel along crossed edge.

02
Left / Right Entry
Cross left or right border
02
Left / Right Entry

Aspect-normalized quad detection stays true on wide cards.

duration: 0.28s

Direction-Aware Hover

Detects pointer crossing edge via atan2 geometry and slides scrim along exact side.

View Details