Bencho Originals

Features

  • Drag the drop anywhere over the photo, or press elsewhere on it and the drop springs to your finger.
  • The middle of the drop magnifies; the rim squeezes the picture, like looking through a ball of glass.
  • Red and blue split slightly near the edge, and a thin bright rim and a soft shadow sit around it.
  • It stretches along the way it's moving and relaxes back to round when it stops.
  • The drop can hang over the photo's edge; outside the photo only the glass rim shows.
  • The photo (public/bencho/meadow.webp) is an original generated image. Without WebGL you get the plain photo.

API reference

<GlassBubble /> from components/bencho/glass-bubble.tsx

PropTypeDefaultDescription
srcstring"/bencho/meadow.webp"Photo URL (same origin, or CORS-enabled).
altstring—Description of the photo.
widthnumber260Photo edge in px (square).
sizenumber104Drop diameter in px.
magnifynumber (0–100)60Magnification in the middle of the drop.
aberrationnumber (0–100)50Strength of the colour fringe.
cornernumber14Photo corner radius in px.

Keyboard interactions

TabFocuses the photo.
Arrow keysMove the drop 10px.
Shift + arrowsMove the drop 30px.

Accessibility

  • The block is a focusable role="img" labelled with the photo's alt text plus how to move the lens.
  • The fallback <img> keeps the photo visible without WebGL.
  • touch-action is off on the photo only, so the page still scrolls around it.

Sound & haptics

Silent by design: no audio and no vibration. All of the feedback is visual, so it works anywhere, muted or not.

Files

Written from scratch for sher.md and inspired by bencho.dev. It contains none of bencho's code or assets.