301

Border Spotlight Grid

As the cursor moves among cards, nearby card borders and insides light up

Card & groupHover & clickUI interactionHeadline & heroCSSradial-gradient

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

A grid of cards in a features section, each with a thin border: as the cursor moves within the whole area, every card paints a soft glow at the cursor's position relative to itself, so the borders of cards near the cursor light up in the accent color with a faint glow inside, while cards farther away barely light up; moving between cards, the light naturally crosses the borders of neighboring cards. (CSS: the card's outer layer uses 1px padding as the border, background radial-gradient(circle at var(--x) var(--y), accent color, transparent); the inner layer another fainter radial-gradient; JS computes each card's relative coordinates on the container's mousemove and writes --x, --y)

When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.

How to use it

  1. Tap “Copy AI prompt”.
  2. Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
  3. The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.

More card & group effects

346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts

Browse all effects →