Spotlight Grid
Spotlight Grid is an interactive React background animation where a cursor-following spotlight highlights a customizable field of dots.
Installation
npm i framer-motionSteps
Dark Mode
This component supports Tailwind CSS dark: variants. To render this component in dark mode, add the dark className to your application's root element (for example, in app/layout.tsx).
Using <html>
<html className="dark"> ... </html>
Using <body>
<body className="dark"> ... </body>
Props
| Property | Default Value | Description |
|---|---|---|
| spotlightSize | 230 | Adjust the cursor radius. |
| gap | 20 | The space between the dots (in pixels). |
| dotSize | 2 | The radius of the base dots (in pixels). |
| hoverDotSize | 2 | The radius of the dots when hovered (in pixels). |
| dotColor | "#333333" | The color of the base dots. |
| hoverDotColor | "#ffffff" | The color of the dots when hovered. |
Built with Spotlight
See how Spotlight is used across React Vibe blocks, templates, and components. Explore real examples to get ideas for your own projects.