LayerwiseLayerwise
  • Features
  • Pricing
  • Templates
  • Docs
DownloadDownload
FeaturesPricingTemplatesDocsAI Website BuilderVibe CodingPersonal Software
DownloadDownload
  1. Glossary
  2. /
  3. Interaction feedback

Spotlight card

Also called spotlight hover effect or cursor glow

A card whose border and background light up with a soft radial glow that follows the mouse pointer, often across a whole grid of cards.

import type { PointerEvent } from 'react';

type Feature = { title: string; description: string };

export function SpotlightGrid({ features }: { features: Feature[] }) {
  // Every card tracks the same pointer, so the glow spills across borders.
  // group-hover only applies on devices that can hover, so touch skips it.
  function onPointerMove(event: PointerEvent<HTMLDivElement>) {
    for (const card of event.currentTarget.children) {
      const rect = card.getBoundingClientRect();
      const style = (card as HTMLElement).style;
      style.setProperty('--x', `${event.clientX - rect.left}px`);
      style.setProperty('--y', `${event.clientY - rect.top}px`);
    }
  }

  return (
    <div
      onPointerMove={onPointerMove}
      className='group grid grid-cols-1 gap-4 sm:grid-cols-3'
    >
      {features.map((feature) => (
        // The 1px padding shows the base border and the glowing border layer.
        <div
          key={feature.title}
          className='relative rounded-2xl bg-border p-px'
        >
          <div
            aria-hidden
            className='absolute inset-0 rounded-[inherit] bg-[radial-gradient(200px_circle_at_var(--x)_var(--y),var(--color-blue-500),transparent)] opacity-0 transition-opacity duration-300 group-hover:opacity-100'
          />
          <div className='relative h-full rounded-[15px] bg-background p-6'>
            <div
              aria-hidden
              className='absolute inset-0 rounded-[inherit] bg-[radial-gradient(200px_circle_at_var(--x)_var(--y),--alpha(var(--color-blue-500)/8%),transparent)] opacity-0 transition-opacity duration-300 group-hover:opacity-100'
            />
            <h3 className='relative font-medium'>{feature.title}</h3>
            <p className='relative mt-1 text-sm text-muted-foreground'>
              {feature.description}
            </p>
          </div>
        </div>
      ))}
    </div>
  );
}
Add a spotlight effect to the feature grid: on pointermove over the grid, set --x and --y CSS variables on each card to the pointer position relative to that card. Paint a 1px border with radial-gradient(200px circle at var(--x) var(--y), the accent color, transparent) and a faint inner glow at 8% opacity with the same center. Fade the glow out over 300ms when the pointer leaves, and turn it off on touch devices.

Paste into Layerwise or any AI coding tool.

What is Spotlight card?

A spotlight card draws a radial gradient centered on the pointer, so a soft circle of light seems to follow the mouse. In the popular grid version, every card tracks the same pointer, so the glow spills across the borders of neighboring cards as you move, like a flashlight sweeping over a panel.

It is common on feature grids, pricing sections, and dark landing pages. Keep it subtle: a brighter border with a faint inner wash reads as polish, while a strong glow makes text harder to read.

Store the pointer position in CSS variables such as --x and --y and use them inside radial-gradient(), so moving the mouse only updates two values per card. Fade the glow out when the pointer leaves, and skip it on touch screens, where there is no pointer to follow.

Often confused with

Glow effect
A glow effect is a soft light around an element that stays put. A spotlight card moves its glow to follow the pointer.

Related terms

All terms

Hover effect

A visual change, such as a lift, glow, or zoom, that happens when the mouse pointer moves over an element to show it can be clicked.

3D tilt card

A card that tips in 3D as the mouse moves over it, often with a moving glare, so it feels like a physical object in your hand.

Border beam

A short streak of light that travels around the edge of a card or button on a loop, drawing attention to it.

Bento grid

A grid of rounded tiles in mixed sizes that fit together like a bento lunch box, often used to show several features at once.

Build it with Layerwise

Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.

DownloadDownloadRead the docs
LayerwiseLayerwise

Build full-stack web apps in minutes with AI.

Product

  • Features
  • Pricing
  • Download
  • Templates

Solutions

  • AI Website Builder
  • Vibe Coding
  • Personal Software

Resources

  • Documentation
  • Changelog
  • Blog
  • Vibe Coding Glossary
  • llms.txt
  • llms-full.txt

Company

  • About
  • Contact

Legal

  • Privacy
  • Analytics Privacy
  • Terms
  • Security
  • Abuse

© 2026 Layerwise. All rights reserved.

Entrances & exits

  • Fade in
  • Slide in
  • Scale in
  • Pop in
  • Blur in
  • Reveal animation
  • Enter and exit animations

Timing & sequencing

  • Duration
  • Delay
  • Keyframes
  • Tweening
  • Stagger
  • Orchestration
  • Fill mode
  • Stepped animation
  • Looping animation
  • Yoyo animation

Easing

  • Easing
  • Linear easing
  • Ease-in
  • Ease-out
  • Ease-in-out
  • Cubic-bezier
  • Asymmetric easing
  • Overshoot easing

Springs & physics

  • Spring animation
  • Stiffness
  • Damping
  • Mass
  • Bounce
  • Velocity
  • Momentum
  • Interruptible animation
  • Rubber-banding

Transforms

  • Translate
  • Scale
  • Rotate
  • Skew
  • 3D flip
  • Perspective
  • Transform origin
  • Origin-aware animation

State transitions

  • Crossfade
  • Morph
  • Shared element transition
  • Layout animation
  • Height auto animation
  • Direction-aware transition
  • Continuity transition
  • Page transition
  • View Transitions API

Scroll effects

  • Scroll reveal
  • Scroll-driven animation
  • Parallax scrolling
  • Scrollytelling
  • Scroll pinning
  • Horizontal scroll section
  • Scroll progress bar
  • Scroll snap
  • Smooth scrolling

Interaction feedback

  • Hover effect
  • Press feedback
  • Ripple effect
  • Shake animation
  • Hold to confirm
  • Drag gesture
  • Drag to reorder
  • Swipe to dismiss
  • Pull to refresh
  • Magnetic button
  • Custom cursor
  • 3D tilt card
  • Spotlight card

Text effects

  • Typewriter effect
  • Text scramble
  • Split text animation
  • Text morph
  • Rotating words
  • Gradient text
  • Shimmer text
  • Number ticker
  • Tabular numbers
  • Underline animation

Loops & ambient motion

  • Marquee
  • Pulse animation
  • Float animation
  • Orbit animation
  • Idle animation
  • Particle background
  • Border beam
  • Confetti
  • Animated gradient

Visual effects

  • Blur
  • Clip-path
  • Mask
  • Before/after slider
  • SVG line drawing
  • Lottie animation

Motion principles

  • Purposeful animation
  • Anticipation
  • Follow-through
  • Squash and stretch
  • Perceived performance
  • Frequency of use
  • Spatial consistency
  • Reduced motion

Animation performance

  • Frame rate (FPS)
  • Jank
  • GPU acceleration
  • will-change
  • Layout thrashing

Layout

  • Hero section
  • Above the fold
  • Sticky header
  • Sidebar
  • Bento grid
  • Card
  • Flexbox
  • CSS Grid
  • Padding vs margin
  • Responsive design
  • Container
  • Masonry layout
  • Split screen
  • Z-index
  • Overflow

Components

  • Button variants
  • Modal
  • Drawer
  • Popover
  • Tooltip
  • Dropdown menu
  • Context menu
  • Toast notification
  • Tabs
  • Segmented control
  • Accordion
  • Carousel
  • Command palette
  • Combobox
  • Toggle switch
  • Checkbox
  • Radio button
  • Date picker
  • Breadcrumb
  • Pagination
  • Infinite scroll
  • Badge
  • Avatar stack
  • Empty state
  • Skeleton screen
  • Spinner
  • Progress bar
  • Data table
  • Stepper
  • Floating label
  • Inline validation
  • Alert banner
  • Tag input

States & patterns

  • Interaction states
  • Focus ring
  • Loading state
  • Optimistic UI
  • Debounce
  • Lazy loading
  • Dark mode
  • Micro-interaction
  • Affordance
  • Undo
  • Drag and drop
  • Keyboard shortcut

Visual styles

  • Glassmorphism
  • Liquid glass
  • Neumorphism
  • Claymorphism
  • Neo-brutalism
  • Skeuomorphism
  • Flat design
  • Mesh gradient
  • Aurora background
  • Grain texture
  • Glow effect
  • Drop shadow
  • Border radius
  • Grid background
  • Typographic hierarchy
  • Accent color
  • Color contrast

Vibe coding & AI

  • Vibe coding
  • Prompt
  • Context window
  • Token
  • AI agent
  • Tool call
  • Hallucination
  • Diff
  • Live preview
  • Checkpoint
  • Git commit
  • Deploy
  • Frontend and backend
  • API
  • Database
  • Rules file
  • MCP
  • Plan mode
  • Visual edit
Database
Storage
Email
Sign-in
Domains
Analytics