Skip to main content

React animation example

React Hover Effect: Spotlight Card Grid

A spotlight hover makes a feature grid feel alive without moving the layout around. The light follows the cursor across every card, so neighbours glow a little too, and the card under the pointer lifts and brightens its border. Away from the pointer the grid stays calm and readable.

  • 4.2 KB file
  • 5 live inputs
  • React runtime
Live, try it

How this spotlight hover grid works

  • Every card draws a radial gradient centred on the pointer, clipped to its own rectangle, so light spills across gaps.
  • Border brightness falls off with distance from the pointer; the hovered card also lifts 4 px on a spring.
  • Clicking a card fires "select" with its title.

Add it to your React app

Install exodeui, download the file below, and paste this. The code updates as you customize. Other runtimes are in the other tabs.

import { ExodeUICanvas } from 'exodeui';

// react-hover-effect.bexode goes in /public (download it below)
export function ReactHoverEffect() {
  return (
    <ExodeUICanvas
      src="/react-hover-effect.bexode"
      fit="Layout"
      autoPlay
      interactive
      onTrigger={(name) => {
        // fires: 'select'
      }}
      style={{ width: '100%', height: 520 }}
    />
  );
}

Inputs

InputTypeDefaultRange
itemsTextPhysics,State machines,Export,Runtime,AI agents,Responsive—
radiusNumber260120 – 500
accentText#a78bfahex colour
inkText#ede9fehex colour
bgText#09080fhex colour

Events: select

More React animations

The same idea in other frameworks: JavaScript magnetic confetti button · JavaScript blob cursor links