Spotlight Card
ComponentsSpotlight Card
Cards

Spotlight Card

A quiet surface that lights up wherever curiosity takes the pointer.

React + CSS
A BRIGHTER KIND OF CARD✳

Less ordinary.

Find your light.
Live component. Go ahead, interact.
Accent
01

Installation

Run this in your shadcn-configured React project. The component and stylesheet are added together.

TERMINAL
npx shadcn@latest add http://localhost:5173/r/spotlight-card.json

This command uses the current site address. For localhost, keep this preview running on the same computer. Files follow your configured components alias.

02

Usage

Import the component and make the details your own.

TypeScript
import { SpotlightCard } from '@/components/anticraft/SpotlightCard';

export function Example() {
  return (
    <SpotlightCard color="#c4b5fd" style={{ padding: '2rem' }}>
      <h3>A brighter idea.</h3>
      <p>A little attention goes a long way.</p>
    </SpotlightCard>
  );
}
03

Props

PropTypeDefaultDescription
childrenReactNode—Card content, including links and other interactive elements.
colorstring'#d7ee9e'A CSS color used by the radial spotlight.
classNamestring''Additional classes for the card.
styleCSSProperties—Inline styles and CSS custom properties. Native div attributes are supported.
04

Motion & accessibility

Considered by default.

The light follows mouse input. Reduced motion holds it in the center; keyboard focus reveals the same centered light. Touch devices receive a static glow.

Use semantic content and meaningful labels in your composition. Check contrast and keyboard behavior with your own styles and content.