Spotlight Card

Use Spotlight Card to add a subtle pointer-following highlight to a bounded card. It works with any child content and can be disabled when the surrounding context needs a static surface.

Preview

Reduce motion:Off
Tune:Off
Inspect

Spotlight Card

Move your cursor across the card to reveal the spotlight.

Installation

Basic usage

TypeScript
project-card.tsx

Examples

Adjust the glow color and size to fit the card surface. Disable the effect in static or dense contexts where it would compete with the content.

Usage

API

PropertyTypeDefaultDescription
childrenReactNoderequiredThe content rendered inside the card.
classNamestring—Additional 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.

Accessibility

The spotlight is decorative. Ensure the card content has its own clear hierarchy and interaction states.

Styling

Use className for the card surface and its children. The effect follows pointer movement without changing the layout.

Contact

Found a bug or need help using this component? Open an issue on GitHub.

License & Usage

Sona UI is available under the MIT license. You may use, modify, and distribute this component in personal and commercial projects.

Was this page helpful?

Your response helps us improve component docs.