The SpotlightCard creates a beautiful dynamic lighting effect. Using a hidden radial gradient that perfectly tracks the mouse position, the lighting effect is only revealed when hovering over the card. Now equipped with 4 unique spotlight variants, including animated pulsing.
Live Preview
Dynamic Lighting
Move your cursor over this card to reveal the underlying background lighting effect.
variant="soft"
Soft Glow:A wide, subtle radial gradient that smoothly tracks the cursor.
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { SpotlightCard } from "@/components/creative/spotlight-card";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { SpotlightCard } from "@/components/creative/spotlight-card";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<SpotlightCard
spotlightColor="example"
color="example"
scale{10}
>
<div>Content goes here</div>
</SpotlightCard>
</div>
);
}