Components/Effects
Card whose border and surface light up under the cursor.
Edge cached
Static pages ship from 300 locations. Median TTFB 41ms.
Signed builds
Every artifact is checksummed and traceable to a commit.
Preview per branch
Push a branch, get a URL. Delete the branch, it's gone.
Installation#
npx shadcn@latest add https://get-neonkit.vercel.app/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.
Now playing
Midnight City
M83 · Hurry Up, We're Dreaming
1:42
4:03
API reference#
SpotlightCard
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.