Design system
Bring attention to the work, not the container
A soft, cursor-led glow gives this card presence while its content remains readable and its actions stay easy to reach.
A free card component with a soft cursor-led spotlight.
Spotlight Card is a free card component for Next.js and React, styled with Tailwind, that adds a soft glow and lit border beneath a fine-pointer cursor. It keeps every child fully readable without hover, JavaScript or motion, so the decoration never carries meaning or blocks interaction.
The card is CSS driven: a small client enhancement writes CSS custom properties for the cursor position without React re-renders. On touch devices no pointer listener is attached, and reduced-motion users receive the same complete, static card content.
Design system
A soft, cursor-led glow gives this card presence while its content remains readable and its actions stay easy to reach.
Add the @te registry to your components.json once:
{
"registries": {
"@te": "https://templateempire.io/r/{name}.json"
}
}Then install the component:
npx shadcn@latest add @te/card-spotlightimport { CardSpotlight } from "@/components/ui/card-spotlight";
export default function Page() {
return (
<CardSpotlight className="max-w-md">
<article className="space-y-3 p-6">
<h2 className="text-xl font-semibold">A card with focus</h2>
<p className="text-muted">Your content stays clear without hover.</p>
</article>
</CardSpotlight>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | required | Card content. It owns its own spacing and semantics. |
| className | string | undefined | Additional classes merged onto the card root. |
Use the card’s Tier 3 CSS custom properties to retheme the decorative glow or change its diameter. The card keeps its semantic background and border tokens, while these values affect only the non-interactive spotlight layers.
:root {
--card-spot-color: var(--color-accent-400);
--card-spot-size: 400px;
}