MagicCard

A card with an interactive spotlight gradient that follows the cursor in real time. Great for feature cards, pricing blocks, or any surface where you want tactile depth feedback.

import { MagicCard } from "@animui/ui"

Basic

Wrap any content in MagicCard — the spotlight tracks automatically.

Magic Card

Move your mouse over this card to see a glowing spotlight follow the cursor.

Custom color

Pass an RGB string to gradientColor to change the spotlight hue.

Blue Spotlight

Custom blue gradient follows your cursor.

Props

PropTypeDefaultDescription
childrenReactNodeContent rendered inside the card.
gradientSizenumber300Radius of the spotlight gradient in pixels.
gradientColorstring"139,92,246"Spotlight color as RGB string, e.g. "139,92,246" for violet.
gradientOpacitynumber0.08Maximum opacity of the gradient overlay.
classNamestringAdditional classes for the card wrapper.
© 2026 Steal Shadow. MIT License.Report an issue