Spotlight Card
Designspotlight-cardSpotlight Card is an Agent Skill for design published in the nexu-io/motion-anything repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Give feature/pricing cards a premium feel: a soft radial spotlight follows the cursor across the card and lifts its border. Keep the glow subtle and low-contrast. Falls back to a plain static border under prefers-reduced-motion and on touch. Do not use on text-dense reading surfaces.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/nexu-io/motion-anything/blob/HEAD/recipes/web/spotlight-card/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/spotlight-card, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
spotlight-card
A radial spotlight that follows the cursor across a card. Part of
motion-anything; obeys MOTION-SPEC.md. Technique
popularized by Aceternity UI, reimplemented dependency-free.
When to use it
- Feature cards, pricing tiles, or a card grid where one should light up under the pointer.
When NOT to use it (restraint)
- Text-dense reading surfaces — the glow distracts. Keep it low-contrast and subtle.
- Touch-only contexts — there is no cursor; it falls back to a static border automatically.
How to apply
- Copy
spotlight-card.cssandspotlight-card.jsinto the project, and link them. - Mark the card:
<div class="spotlight"> … </div> - Auto-attaches to
.spotlight. JS writes--mx/--my; the CSS paints the glow there.
Accessibility & performance
- Disabled under
prefers-reduced-motionand on(hover: none)touch devices (static border stays). - Paints a radial-gradient only — no layout thrash.
Framework notes
- React: call
attachSpotlight(ref.current)inuseEffect, guarded by the same checks.