Spotlight Card Component

A card with a radial spotlight glow that smoothly follows the cursor, adding depth and interactivity to any content.

Features

  • Cursor-following radial spotlight built on motion values for jank-free updates.
  • Fully customizable glow color and size.
  • Works with any content via children.
  • Can be disabled for static contexts.

Spotlight Card

Move your cursor across the card to reveal the spotlight that follows your pointer.

Playground

Adjust the spotlight size and color, then move your cursor across the card.

Spotlight Card

Move your cursor across the card to reveal the spotlight.

Controls
Spotlight size (px)350
Spotlight color
Disable effect

Installation

Usage

Props

PropertyTypeDefaultDescription
childrenReactNoderequiredThe content rendered inside the card.
classNamestringAdditional CSS classes for the card.
spotlightColorstring"rgba(255,255,255,0.15)"The color of the spotlight glow. Accepts any CSS color value.
spotlightSizenumber350The radius of the spotlight in pixels.
disabledbooleanfalseDisables the spotlight effect.