Spotlight Card
spotlight-cardA card lit by the pointer: a soft wash follows the cursor and the nearest stretch of border catches the light. Tracked through CSS variables, so it never re-renders, and keyboard focus inside lights it too.
import { Gauge, ShieldCheck, Zap } from "lucide-react";
import { SpotlightCard } from "@/components/forme/spotlight-card/spotlight-card";
const features = [
{ icon: Zap, title: "Edge functions", body: "Run code in 38 regions, 40 ms from everyone." },
{
icon: ShieldCheck,
title: "Zero-trust access",
body: "Every request signed, every secret rotated.",
},
{ icon: Gauge, title: "Observability", body: "Traces, logs and metrics on one timeline." },
];
export function SpotlightCardDemo() {
return (
<div className="grid w-full gap-3 sm:grid-cols-3">
{features.map(({ icon: Icon, title, body }) => (
<SpotlightCard key={title} className="p-5">
<span className="grid size-9 place-items-center rounded-xl border border-border bg-background text-brand">
<Icon aria-hidden className="size-4" />
</span>
<p className="mt-4 text-title-2-semibold">{title}</p>
<p className="mt-1 text-body-2-regular text-muted-foreground">{body}</p>
</SpotlightCard>
))}
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
Usage
import { SpotlightCard } from "@/components/forme/spotlight-card/spotlight-card";
<div className="grid gap-4 sm:grid-cols-3">
{features.map((feature) => (
<SpotlightCard key={feature.title} className="p-5">
<h3>{feature.title}</h3>
</SpotlightCard>
))}
</div>When to use
Reach for it
- Grids of feature or pricing cards on a marketing page, where the light ties the grid into one surface.
Use something else
- Cards in product UI that people scan quickly; the wash competes with the content.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
Parts
SpotlightCardTakes<div>attributes
Accessibility
- With keyboard focus inside, the rim lights from the centre, so focus is never quieter than hover.
- The light is decoration only; nothing is hidden behind the hover.
Motion
- The pointer's position is written to two custom properties, not React state, so following it costs no renders.
Responsive behaviour
- Touch input is ignored: on a phone it is simply a card.
Related


Confirm Button
A destructive button that grows into its own confirmation on a spring, so the question appears where you are looking. Focus lands on Cancel, Esc or clicking away disarms it, and the confirm button shows a spinner while the action runs.
motion

Dynamic Island
A black pill that morphs on a spring to fit whatever it is showing: a timer, a call, a song or a notification. Content swaps through a short blur crossfade, the corners never stretch mid-morph, and each change is announced politely.
motion

Marquee
A seamless, endlessly scrolling row for logos, photos or testimonials. It pauses on hover and focus, screen readers hear the content once, and reduced motion turns it into a row you scroll by hand. Pure CSS.
motion