Spotlight Card
Web (React)
A card with a subtle spotlight gradient that follows the user's mouse cursor on hover.
A card component that creates an ambient spotlight effect tracking the user's mouse cursor across its surface. Perfect for subtle emphasis and giving depth to interfaces.
🔦
Spotlight Card
Move your mouse over this card to reveal a subtle spotlight effect tracing your cursor. Great for subtle emphasis and interactive depth.
Installation
CLI
npx @modus-ui/cli add spotlight-cardManual
- Copy the code from the component tab.
- Create a file at
components/ui/spotlight-card.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
spotlightColor | string | "hsl(var(--primary) / 0.14)" | Colour of the spotlight that follows the cursor. Defaults to a soft tint of the theme primary, so it shows on light and dark cards. |
Comments