Glow Card
Card with radial cursor-tracking glow. A soft spotlight follows the mouse with zero re-renders using CSS custom properties. Optional border glow mode.
Layout
Purple Glow
Hover to reveal the animated glow effect with gradient borders.
Blue Glow
Custom glow colors create different visual themes.
Installation
Copy and paste
Copy the component source code and paste it into your project.
import { GlowCard } from "driftkit";Props
| Name | Type | Required | Description |
|---|---|---|---|
children | ReactNode | Yes | Card content. |
borderGlow | boolean | No | Enable glowing border effect. |
glowColor | string | No | Glow color (use rgba for opacity). |
glowSize | number | No | Glow radius in pixels. |
glowOpacity | number | No | Glow opacity multiplier. |
🎮
Playground
Tune spring physics for this component
Live Preview
Spring Physics
300
30
1
Generated Code
const springConfig = {
"type": "spring",
"stiffness": 300,
"damping": 30,
"mass": 1
};
// Basic hover animation
<motion.div
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
transition={springConfig}
>
<GlowCard />
</motion.div>
// Advanced with custom animations
<motion.div
animate={{
scale: [1, 1.02, 1],
y: [0, -4, 0]
}}
transition={{
...springConfig,
repeat: Infinity,
repeatDelay: 2
}}
>
<GlowCard />
</motion.div>Stiffness: Controls animation speed. Higher values create snappier animations.
Damping: Controls resistance to motion. Lower values create more bounce and overshoot.
Mass: Controls the perceived weight. Higher values make animations slower with more momentum.
Source Code
View the source code on GitHub to see the full implementation.
View on GitHub