Built for Motion
Log in

GSAP Jewellery Product Gallery with Magnifying Loupe and Iris Transitions for React

proOn LoadOn HoverMouse MoveOn ClickDrag
Loading preview

Overview

A product gallery for React and Next.js with a jeweller's loupe: hover the picture and a gold-rimmed lens magnifies the full-size photo, 2x to 4x. Pieces change through a circular iris, and the name, price and options roll over.

On load the main picture opens as an iris from the centre, with a gold ring riding its edge. The thumbnails drop in one after another, the name rises letter by letter, the price rolls up from zero, and then the loupe crosses the piece by itself: in from the side, a pause and a closer look at the detail you marked with focus, and out again.

Details

Category
Product
Interaction
On Load + On Hover + Mouse Move + On Click + Drag
Trigger
On Load
Languages
React, TypeScript, Tailwind

(01)Keep exploring

All 150 components

Built with the same techniques

(02)FAQ

GSAP Jewellery Product Gallery with Magnifying Loupe and Iris Transitions for React — FAQ

01What does it need?

npm install gsap @gsap/react, and Tailwind CSS v4 for the layout classes. Images load through next/image, and the component imports its own loupe-gallery.css.

02How do I add my own pieces?

Pass pieces with a name, collection, price, description, image and alt. zoomImage is the full-size file for the loupe (1800 to 2400px on the long edge); without it the loupe reads image. focus is where the glide stops, as fractions of the picture, and options become the chip groups. Wrap a word of the name in asterisks to set it in italic.

03Which fonts does it use?

It reads --font-display for the names and prices and --font-sans for everything else, and falls back to Georgia and Helvetica. The demo loads Playfair Display (with its italic) and Hanken Grotesk through next/font/google as those two variables.

04How does it work on a phone?

The thumbnails become a row under the picture. Press and hold the picture to bring the loupe up above your finger, and drag to move it. A quick sideways swipe changes the piece, and an up or down swipe scrolls the page as usual.

05Is it fast without a graphics card?

Yes. There is no WebGL. The lens is one small canvas that only redraws when it moves or the magnification changes, the bezel is CSS, and the iris is a clip-path. It holds 60fps in a browser with hardware acceleration switched off.

06What happens with reduced motion?

No iris, no glide, no drift and no autoplay. Pieces crossfade, the price changes at once, and the loupe still works because you move it yourself.

07Can I hook up the buttons?

onAddToBag gets the piece and the chosen options; return a promise and the spinner waits for it. onWishlistChange tells you when the heart is toggled. currency and locale format the price, and ctaLabel, notes and viewingHref change the text under it.