Skip to content
Interactive

HoverSpotlight

When the mouse comes in, the block goes dark and only a soft circle around the pointer stays lit. The light closes in as the dark fades up. Touch and keyboard see the block fully lit.

Download
  • React
  • Tailwind CSS v4
  • motion

Props

NameTypeDefaultWhat it does
childrenReactNode—Stays clickable: the dark layer lets the pointer through.
radiusnumber140Size of the light in pixels.
dimstring"rgb(8 7 16 / 0.9)"Colour of the dark around the light. Match your background.
classNamestring""On the wrapper.