Components / component
Spotlight Button
A solid pill with a soft light that follows the pointer across its surface and sharpens along its edge.

Implementation
A solid pill with a soft light that follows the pointer across its surface and sharpens along its edge.
- Framework
- React 19.3.1 with TypeScript
- Motion
- Native CSS and browser APIs. No GSAP required.
- Available modes
- build
- Version
- 1.0.0 · published
Source code
Quality evidence
Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .
Changelog
v1.0.0 · A solid pill with a soft light that follows the pointer across its surface and sharpens along its edge.
Frequently asked questions
Does it need a JavaScript animation loop?
No. The pointer position is written to two CSS variables and the browser draws the light. There is no animation frame loop.
What happens on touch screens?
The light does not follow touch. Keyboard focus shows it at the center, and the button works normally.