← All components
Surfaces / effect

Glare Hover

A slanted specular highlight sweeps across a surface on hover or keyboard focus.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • The exact gradient stops and CSS ease curve are retained. Hover and focus within trigger the same sweep. The decorative overlay never intercepts input.
  • playOnce matches the upstream behavior: snap back when leaving, instead of reversing the sweep.
  • The component defaults to a 500px square; the gallery uses a 360px-tall card. max-width:100% keeps the surface inside narrow containers.
  • Demo.tsx includes the full composition. Reduced motion, pause, hidden and offscreen behavior use an owned animation clock.
React 19.2Pointer Events

React Bits · MIT with Commons Clause. Used with explicit project permission; see bundled notice.

Props

PropTypeDefaultDescription
widthstring"500px"Width
heightstring"500px"Height
backgroundstring"#000000"Background
borderColorstring"#333333"Border
borderRadiusstring"10px"Radius
glareColorstring"#ffffff"Glare color
glareOpacitynumber0.5Glare opacity
glareAnglenumber-45Glare angle
glareSizenumber250Glare size
transitionDurationnumber650Sweep duration
playOncebooleanfalseSnap back on exit
childrenReactNodeundefinedSurface content; links and buttons remain interactive.
styleCSSProperties{}Additional container styles.
pausedbooleanfalseFreeze decorative motion.
replayTokennumber0Change to replay or reset the effect.
classNamestring''Text classes for Curved Loop; outer classes for the other components.