Spotlight Card
Card whose border and surface light up under the cursor.
Median time to first byte
41ms
- fra138 ms
- iad144 ms
- hnd151 ms
- gru163 ms
Signed builds
1,284 artifacts this week, each traceable to its commit.
A preview per branch
37 live right now. Delete the branch and its URL goes with it.
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/spotlight-card.jsonUsage
import { SpotlightCard } from "@/components/ui/spotlight-card"
<SpotlightCard className="p-6">Hover me</SpotlightCard>Examples
Wider light
radius sets the size of the pool of light.
API reference
Also accepts every div attribute.
| Prop | Type | Default |
|---|---|---|
color | NeonColorLight color. | inherited |
radius | numberDiameter of the light in pixels. | 360 |
Accessibility
- The pointer position is written to CSS variables directly, so moving the cursor never re-renders React.
- The light also appears when something inside the card has keyboard focus.