Measured entry
motion-primitives-spotlight
hero-effectgradient-glowmotion on file
A client-side React spotlight that tracks the pointer with a spring-driven radial glow inside its parent. It ships as a shadcn registry component and depends on Motion, Tailwind utility classes, and the usual cn helper imported through the project alias.



Measured
Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | clean at 375, 768, 1440 |
| Axe critical | 0 |
| Axe serious | 0 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 67.8 KB (133.2 KB build, 65.4 KB baseline) |
| Bare mode | FAIL |
| Provider required | NO |
| Demo used | written from the component source API |
What the harness recorded
BARE BUILD
✗ Build failed in 30.88s error during build: [vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/spotlight.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'
Verdict
A focused, reliable decorative effect with clean mounting and no observed accessibility or overflow issues. It needs a shadcn-style setup out of the box because its utility helper alias is assumed, and the Motion dependency is substantial for a single glow.
Use it if
- You want a pointer-following glow over a dark hero, card, or callout.
- Your React app already uses Tailwind and Motion.
- The containing element can safely become positioned with clipped overflow.
Skip it if
- The effect must provide equal value on touch-only devices, where hover tracking does not apply.
- The parent must preserve visible overflow or its existing positioning behavior.
- You want a CSS-only accent without adding the Motion runtime.
Install
| Declared dependencies | motion |
|---|---|
| Missing on install | none |
| Bare install | fails once the shadcn-style helpers are removed, so it needs that setup |
| Provider | no provider required in the harness |
In a non-shadcn project, install Motion, configure Tailwind with the utilities used here, add a cn class-merging helper or replace that call, and map the project alias or change it to a local import. Render it from a client component.
Source and credit
This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.
Author repository
github.com/ibelick/motion-primitivesAlternatives
Other published entries for the hero-effect pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- ruixen-hero-title-animationunclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 18.7KB
- Bare
- pass
- Prov
- NO
- tripled-glassmorphism-hero-block-shadcnuiglassmorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 30.4KB
- Bare
- fail
- Prov
- NO
- cultui-three-d-carousel3d
- Renders
- YES
- A11y
- 0
- Gzip
- 61.2KB
- Bare
- fail
- Prov
- NO
- ruixen-card-carousel-herounclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 63.3KB
- Bare
- fail
- Prov
- NO
- fancy-circling-elements3d
- Renders
- YES
- A11y
- 0
- Gzip
- 66.5KB
- Bare
- fail
- Prov
- NO
- magicui-hero-video-dialog3d
- Renders
- YES
- A11y
- 0
- Gzip
- 69.6KB
- Bare
- fail
- Prov
- NO