Use it as the hero of a page about timber or provenance. Pass photo and drawing (both required, pixel-aligned); for another cut set pith, rings, bark and ringScale. The loupe follows the hand, the wheel zooms with a mouse and a click sets a lens down.
When not to use
Not for dense data screens, forms or long text, and not for a photo without a matching drawing. The ring data is tuned to one bundled end-grain image, so another subject needs its own measurements.
Use it as the hero of a page about timber or provenance, with a photograph and a pixel-aligned drawing of the same frame; pass your own pith, rings, bark and ringScale for another cut. Effects are visual
pieces rather than controls: they do not replace the Interface components in dashboards and forms.
The effect needs your image through its image prop (see the table below). Use a JPEG or WebP of at
least 1600 px on the long side, under 200 KB (400 KB at full screen); host it on your own origin or
send CORS headers, because the browser blocks cross-origin textures. The demo images stay on this
site and are not installed.
The canvas and the readout tags are decorative and aria-hidden; state what the rings show in your own copy.
The effect never takes focus. On touch screens an automatic lens slides along the radius and pauses to read a ring, in a loop; a finger takes over and the lens returns 1.5 s after release, and a tap sets a lens down. Zooming with the wheel exists only with a mouse, so the page always scrolls.
One loupe at rest over a ring near the axis, its year showing, no movement. The RingCount hooks read usePrefersReducedMotion, so the MotionKitProvider setting applies too.
One full-screen pass with two textures and at most two lenses; the ring is snapped to the drawing from a half-size luminance copy read once at load. The loop stops off screen and in hidden tabs.
The device pixel ratio is capped at 2. Without WebGL support the content renders without the effect.
Source size is checked against the 15 KB gzip budget for effects (pnpm size).
Technical sheet
Motion
calm
260 ms · bounce 0
lively
400 ms · bounce 0.3
playful
540 ms · bounce 0.45
Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Size
Not measured yet · budget 15.0 kB gzip
Component and MotionKit helpers; excludes react, react-dom.
Dependencies
motion
Triggers
pointer movement, click, entering the viewport
Reduced motion
One loupe at rest over a ring near the axis, its year showing, no movement.
Keyboard
No keyboard interaction of its own.
Browsers
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)