Animations
SpotlightEffect
Radial spotlight that follows cursor movement over a container.
Quick Preview
Hover over me
Move your cursor around to see the spotlight follow.
Installation
# No extra dependencies
// Copy component fromsrc/components/animations/SpotlightEffect.tsx
Usage
import SpotlightEffect from '@/components/animations/SpotlightEffect'<SpotlightEffect className="bg-black rounded-xl p-12"><h3 className="text-white text-2xl font-bold">Hover me</h3></SpotlightEffect>
Examples
Purple Spotlight
Purple glow
Customizable color and strength.
Card Grid with Spotlight
Card 1
Card 2
Card 3
Card 4
Card 5
Card 6
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children* | React.ReactNode | - | Content inside the spotlight container |
size | number | 400 | Spotlight diameter in px |
strength | number | 0.15 | Opacity 0โ1 |
color | string | '#F45A5A' | Spotlight color |
className | string | - | Additional CSS classes |