Magic card
A frosted card with a glow that follows the pointer.
Follows the pointer
Move across the card and the glow tracks you.
Brand colour, tighter
A custom property sets the colour, radius sets the reach.
Installation
pnpm add @heyramzi/uiUsage
import { MagicCard } from "@heyramzi/ui/effects/magic-card";Keyboard and accessibility
- The glow follows the pointer only. A keyboard user sees the plain card.
- With reduced motion on, the glow moves without easing.
API reference
childrenrequiredSnippetglowboolean- Default
true - Draw the pointer-following glow. Off leaves the frosted card and the hover edge.
radiusnumber- Default
500 - Glow radius in px.
classstringcontentClassstring- Classes for the padded box around the children.
| Prop | Type | Default |
|---|---|---|
children required | Snippet | |
glow Draw the pointer-following glow. Off leaves the frosted card and the hover edge. | boolean | true |
radius Glow radius in px. | number | 500 |
class | string | |
contentClass Classes for the padded box around the children. | string |