Project portfolio Browse selected work

Shopify Plus Upgrade Monthly Fee Reduction + Up to $4800 Development Fee Credit - Exclusive WesWoo Offer

Search
Galleries & detail viewing

Thumbnail expansion transition

Remember the thumbnail position, open its detail and return. Match thumbnail, enlarged project and return location, including the last phone item.

Open two thumbnails in quick succession and dismiss. Inspect the final image and return target after the earlier image finishes loading.

Closing after the transition restored focus to the source thumbnail. Repeat that last check after changing the artwork or transition timing.

Reproduce the test and inspect the readings

Open the first thumbnail, wait for the transition, close it and check both dialog states and focus on the original link.

908 and 316 px, both preferences
true then false then true

WESWOO loaded this example’s published HTML, CSS and JavaScript in standalone Chrome at 700 px viewport height. Both motion preferences were tested at each width.

2026-11-24 · Chrome 157.0.8103.79

Download test conditions and raw readings (JSON)

Preparing preview

How the effect works

Connect two views of the same image

In a case gallery, expansion from the chosen thumbnail can preserve its relationship to the directory. The transition serves inspection; retain original-image links and return to the opener after closing. It is not variant selection, and video or 3D media needs a different treatment.

Measure again when closing

The example measures thumbnail and destination geometry and connects them with translation and scale. Closing reads fresh positions to account for intervening scrolling. A theme can select images from product media with an explicit limit. Rapid clicks, early closing or Section removal must invalidate stale asynchronous work so a late image cannot reopen the view.

Example source code

View 3 source filesHTML · CSS · MJS
thumbnail-transition.html
<section class="fx" data-effect="thumbnail-transition"><header class="ww-study-intro"><small>24 / FROM THUMBNAIL TO STORY</small><h2>OPEN A<br><em>NEW WORLD.</em></h2><p>Real website project screens. Open a screen to inspect it, then return to the same position.</p></header><ww-product-flip data-teaching-paused data-state="closed"><div class="ww-thumbs"><a href="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/shokz-openfit-preview.webp" data-media-id="study-1" aria-haspopup="dialog"><img src="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/shokz-openfit-preview.webp" alt="SHOKZ website project screen" width="900" height="700"><span class="ww-study-label"><span>SHOKZ</span><span>01 +</span></span></a><a href="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/termino-preview.webp" data-media-id="study-2" aria-haspopup="dialog"><img src="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/termino-preview.webp" alt="TERMINO website project screen" width="900" height="700"><span class="ww-study-label"><span>TERMINO</span><span>02 +</span></span></a><a href="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/iniu-preview.webp" data-media-id="study-3" aria-haspopup="dialog"><img src="https://www.weswoo.com/wp-content/themes/weswoo/assets/images/case-brands/project-previews/iniu-preview.webp" alt="INIU website project screen" width="900" height="700"><span class="ww-study-label"><span>INIU</span><span>03 +</span></span></a></div><div class="ww-dots" aria-label="Gallery pagination"><button type="button" data-slide="0" aria-label="Study 1" aria-pressed="true">●</button><button type="button" data-slide="1" aria-label="Study 2" aria-pressed="false">●</button><button type="button" data-slide="2" aria-label="Study 3" aria-pressed="false">●</button></div><p data-error hidden>Image unavailable. Follow the original image link.</p><dialog aria-label="Expanded website project screen"><div class="ww-tools"><a data-original>Open original image</a><button data-close autofocus>Close ×</button></div><img data-expanded width="900" height="700" alt=""><p data-caption></p></dialog></ww-product-flip></section>

Integration and checks

Theme integration

3 steps
  1. Duplicate the theme

    Integrate and preview the example in a duplicate theme.

  2. Connect the section settings

    Replace demo copy and artwork with section settings and scope the styles to that section.

  3. Connect the editor lifecycle

    Use the lifecycle script for editor reloads, pausing offscreen and cleanup on unload.

Placement

  • An independent gallery Section in a duplicate theme, reading images from product.media. Select a product or use the current one, limited by image_limit. Keep original-image links; variants, cart, video and 3D media remain outside its scope.

Interaction

  • Measure the thumbnail, open a native dialog, measure the image and animate FLIP translation and scale. Normal close reverses fresh geometry. A generation token rejects stale asynchronous completion; pause, unload and interrupted opening cancel and close immediately.

Touch and accessibility

  • Reduced motion shows the final state directly. Escape and the close button return focus. No JavaScript, missing dialog support or incomplete markup retain original-image links. An image error closes with a notice, cleared on the next open.

Setup notes for this effect

Files: copy sections/ww-product-flip.liquid, assets/ww-product-flip.js and assets/ww-product-flip.css. The Section loads both assets itself and does not require the older ww-effect-studio.js.

Data: use the current or selected product’s product.media images, capped by image_limit. Video and 3D media are excluded; no images displays the editable empty message.

Integration: add the Section in a duplicate theme. Edit headings, close/original/error/pagination text and provide useful image alt text. Repeated Sections must keep independent dialogs, focus and cleanup.

Acceptance: local Liquid rendering and Theme Check passed, which does not establish merchant-theme installation. Verify images, styles, keyboard and touch in the actual theme, and separately check native product media and cart behavior.

Before launch

Integration files
assets/ww-product-flip.css
ww-product-flip{display:block;color:inherit}ww-product-flip .ww-thumbs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}ww-product-flip a{color:inherit}ww-product-flip .ww-thumbs img{display:block;width:100%;height:auto}ww-product-flip dialog{border:0;padding:18px;background:#f4f0e7;color:#20241f;width:min(92vw,1000px);max-height:90dvh;overflow:auto}ww-product-flip dialog::backdrop{background:#101210dd}ww-product-flip [data-expanded]{display:block;width:auto;max-width:100%;max-height:65dvh;height:auto;object-fit:contain;transform-origin:0 0}ww-product-flip button{min-width:44px;min-height:44px}ww-product-flip :focus-visible{outline:3px solid #335c2d;outline-offset:4px}ww-product-flip .ww-tools{display:flex;gap:16px;align-items:center;justify-content:space-between}ww-product-flip[data-state="opening"] [data-caption],ww-product-flip[data-state="closing"] [data-caption]{visibility:hidden}@media(max-width:1180px){ww-product-flip .ww-thumbs{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}ww-product-flip .ww-thumbs::-webkit-scrollbar{display:none}ww-product-flip .ww-thumbs>a{flex:0 0 85%;max-width:580px;scroll-snap-align:start}ww-product-flip [data-expanded]{height:auto}}
ww-product-flip .ww-dots{display:none}@media(max-width:1180px){ww-product-flip .ww-dots{display:flex;justify-content:center;gap:4px;flex-wrap:wrap}ww-product-flip .ww-dots button{border:0;background:none;font-size:12px;opacity:.45}ww-product-flip .ww-dots [aria-pressed="true"]{opacity:1}}
ww-product-flip .ww-thumbs{position:relative}ww-product-flip .ww-thumbs>a{text-decoration:none}ww-product-flip .ww-study-label{display:flex;justify-content:space-between;padding:14px 0;font-size:12px;letter-spacing:.12em}ww-product-flip .ww-thumbs>a:hover img{filter:brightness(1.04)}ww-product-flip [data-expanded]{margin:12px auto}

Insert the selected effect into the shell. Each module loads one effect; multiple types need an explicit registry and Section mapping.

Sources and further reading

Scope and licensing

Examples are authored by WESWOO and credited open-source contributors; retain their applicable licenses. Project screens and photographs remain with their rights holders. Downloads use placeholders; replace them with imagery you may use.

Shopify/dawn · modal / slider base classesShopify/dawn · product media galleryShopify/dawn · license

References checked · 2026-11-24