Spotlight Feature Grid

A responsive grid of feature cards where a radial spotlight effect tracks the mouse within each card individually. Each card maintains its own spotlight state. Built for landing page feature sections.

ReactNext.jsClient ComponentReactMotionCSS
Loading preview…

CLI Installation

Add to your project using the shadcn CLI:

npx shadcn@latest add @mridha/spotlight-feature-grid

Registry endpoint: https://ui.mridha.net/r/spotlight-feature-grid.json

Manual Installation

1. Install dependencies

pnpm add motion

2. Copy the component file

Copy the source from the Code tab above into components/ui/spotlight-feature-grid.tsx

3. Import the component

import { SpotlightFeatureGrid } from "@/components/ui/spotlight-feature-grid";

4. Use it in a page

export default function Page() {
  return (
    <main>
      <SpotlightFeatureGrid />
    </main>
  );
}

Dependencies

Accessibility

  • Each card uses semantic article or div with appropriate role.
  • Spotlight effect is purely decorative and uses pointer-events tracking.
  • All card content is readable without the spotlight effect.

Performance

  • Per-card mouse tracking is lightweight — uses onMouseMove at card level.
  • CSS custom properties are used for spotlight position to minimize React re-renders.