Glowing Effect
Border glow that follows the pointer around a card's edge as it comes near.
- 1.8 KB gzipped
- Zero dependencies
- Reduced-motion safe
- Base UI & Radix compatible
Follows your pointer
Bring the cursor near any edge and the border lights up where you are.
Learn moreInstallation
pnpm dlx shadcn@latest add https://velora.colorlib.com/r/glowing-effect.jsonAdds components/velora/glowing-effect.tsx.
Examples
Feature grid
Six feature cards in a three-column grid, each lighting up as the pointer nears it.
Fast by default
Ships static HTML and hydrates only what moves.
Themeable
Seven CSS variables re-skin every component.
Accessible
Keyboard paths and reduced-motion states built in.
Tiny
Most components weigh under 2 KB gzipped.
Composable
Plain React and Tailwind, no wrappers to fight.
MIT licensed
Copy it, change it, ship it commercially.
Props
| Prop | Type | Default |
|---|---|---|
proximityDistance in px outside the card at which the glow starts to fade in | number | 64 |
spreadLength of the lit arc, in degrees of the border | number | 80 |
borderWidthThickness of the glowing border in px | number | 2 |
haloAdd a soft blurred halo behind the lit border | boolean | true |
Also accepts every <div> attribute, forwarded to the root element.
Accessibility
- Reduced motion
- The arc stops following the pointer; hovering the card shows a soft glow around the whole border instead.
- Keyboard
- The effect is not focusable; the full border lights up while the card or anything inside it has keyboard focus.
- Screen readers
- The glow layer is aria-hidden and ignores pointer events; only the card content is read.