AddThisFeature

Hover Zoom Magnifier

Show a magnified detail of an image on hover, the way product photos do.

simple Media & Video

What it adds

A hover magnifier that reveals a high-resolution detail of an image under the pointer without opening a dialog.

What your agent is told to do

5
  1. 1

    Apply this only where detail genuinely matters — product photography, scans, diagrams — and not to every image in the app. A magnifier on an avatar is noise.

  2. 2

    Treat it as an enhancement over the app's existing Image Lightbox rather than a replacement. Hovering magnifies, clicking still opens the lightbox, and the two must share the same image sources and the same alt text.

  3. 3

    Require a source meaningfully larger than the displayed size. If the only available file is the one already on screen, skip the effect entirely instead of magnifying a blurry upscale.

  4. 4

    Load the high-resolution source on first pointer entry and hold it, so the magnifier does not open onto a blank panel and does not re-fetch on every pass.

  5. 5

    Do not intercept the pointer with an overlay that swallows clicks. Links, buttons, and text selection underneath the image must keep working exactly as they did.

Edge cases it handles

8
  • Touch devices have no hover. Detect a coarse pointer and fall back to tap-to-open full view rather than firing the magnifier on a tap and trapping the user in it.
  • Without a source larger than the rendered image there is nothing to magnify. Detect the missing high-resolution rendition and disable the effect quietly rather than showing an upscaled smear.
  • Near the right or bottom edge of the window the magnified panel would be clipped. Flip it to the other side of the cursor and keep it fully inside the viewport.
  • Preload the zoom source when the pointer first enters the image, so the first magnification shows content rather than an empty box while the file arrives.
  • The magnifier must not block text selection or clicks on links and buttons layered over or beside the image.
  • The effect must not be the only way to see detail. Keyboard users and screen reader users need the full view reachable without a pointer.
  • Fast pointer movement across a grid of images must not queue a stack of high-resolution downloads; cancel loads for images the pointer has already left.
  • Suppress the follow animation when reduced motion is requested and simply place the panel.

Definition of done

9
  • Hovering a qualifying image shows a magnified detail tracking the pointer.
  • Images without a higher-resolution source do not show the effect at all.
  • Touch and coarse-pointer devices fall back to opening the existing lightbox.
  • The magnified panel stays fully within the viewport at every screen edge.
  • Links, buttons, and text selection under the image continue to work.
  • The high-resolution source is fetched once and the first hover is never blank.
  • The full-size view is reachable by keyboard without hovering.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.