Micro-interactions
Spotlight Shell
A card shell with 3D magnetic tilt, radial glow, and a shimmer sweep.
Install
bun add motion clsx tailwind-mergeThen copy 2 files into your project:
- components/registry/spotlight-shell/spotlight-shell.tsx
- lib/utils.ts
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| accentColor | string (hex) | "#a855f7" | Accent color for the glow and accent line. |
What It Demonstrates
- 3D tilt / Flip
- Rotate in 3D space (rotateX / rotateY) to add depth.
- Perspective
- How strong the 3D effect looks — a lower value exaggerates depth, like the viewer is closer.
- Hover effect
- Visual change when the cursor moves over an element.
- Skeleton / Shimmer
- A placeholder with a moving sheen shown while content loads.
Related Components
Tilt
A machined card that leans toward the pointer in 3D while a specular sheet slides across its face.
Holofoil
Holographic trading-card foil over real content. The diffraction band travels against the tilt while the specular follows it, and the flake only lights where the rainbow currently falls — which is what stops the whole thing reading as one gradient sliding around.
Pixel Transition
Reveal a second layer through a random pixelated dissolve on hover.
Border Glow
A cursor-proximity gradient border with an outer glow.
Hover List
A display-type list where a shared accent block springs between rows on hover while the text indents and inverts.
Magnetic Button
A button that leans into your cursor — caught in a magnetic field it slides toward the pointer while an amethyst aura swells with proximity, then snaps home on a spring and answers every click with a dark ripple bursting outward from the point of contact.