Squiggle Product Gallery

£5

An infinite shoppable card gallery that follows a winding line, with wave-led tilt, soft momentum and clickable product actions.

intermediate
6 more details
infinite-loopcurved-pathmomentumvelocity-reactivesnapproduct-gallery
Squiggle Product Gallery - GSAP animation effect preview

This demo reads better at your own screen size than in the frame below:

About this effect

A playful product discovery rail that carries real HTML cards over the crests and dips of a winding line. Product names, prices and add-to-bag buttons travel with the photographs, giving a shop collection a more expressive rhythm.

Read the full effect overview

A companion to Arc Offset Gallery, with a repeating wave in place of its shallow bowl-shaped path. The included demo bag provides instant feedback; a small custom event connects each product action to your own commerce system.

What's included

8 items
  • Infinite winding path with automatic extra card copies for wide screens
  • Cards tilt with the line and stretch gently with movement
  • Drag, swipe, wheel and arrow-key browsing with soft card snapping
  • Native product buttons remain clickable without accidental purchases after swipes
  • Custom add-to-bag event with product ID and title
  • Responsive wave depth and card spacing
  • Readable native product rail for reduced motion and no JavaScript
  • Scoped cleanup for route changes and dynamic motion preferences

Perfect for

4 use cases
  • Homeware collection carousels
  • Shoppable editorial lookbooks
  • Featured product discovery
  • Design-store collection highlights

How it works

1 section

GSAP eases a continuous rail position toward wheel, drag and keyboard input. Cards loop through a repeating wave, tilting along its slope while velocity adds restrained stretch. Product actions remain semantic buttons and emit an integration event for the host shop. Reduced motion restores the native horizontal layout.

Difficulty Intermediate
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Paid effect

Purchase to unlock the code.

Buying Squiggle Product Gallery opens the HTML, CSS and JavaScript source, the full documentation, an AI setup prompt for your editor, and every update we ship to it. Standard license: unlimited personal and commercial projects.

£5 Standard license, unlimited projects

Browse free effects

Documentation

Quick Start

1. Add to your HTML <head>:

Code snippet omitted: it ships with the download.

2. Add before closing </body>:

Code snippet omitted: it ships with the download.

3. Add the collection to your <body>:

Copy the main[data-squiggle] element from index.html, then replace the images, names, prices and product IDs. The demo includes eight products. Extra visual copies are added automatically when a wider stage needs them. The included assets/demo.js provides a local demonstration bag; it does not create orders or connect to a checkout.

Using It With Your Own Design

The script needs a data-squiggle root containing data-squiggle-viewport, data-squiggle-track and equal-width data-squiggle-card elements. Each product action uses data-squiggle-buy="your-product-id"; its card needs an h2 for the product name. Native buttons and links inside cards retain their normal behaviour. The script emits an event only for elements with the buy hook.

The photographs, font, collection header, prices, colour tokens and demo bag are replaceable styling. The optional SVG contains a data-squiggle-path path; it shows the route behind the cards. Keep its sizing and the is-live positioning rules when restyling. The track gap supplies the card pitch. Cards must share a width. The script repeats complete collections as needed to cover the viewport plus two card widths, keeping the wrap out of sight even on ultrawide displays. Copies preserve product IDs, so their actions refer to the same products; do not put ID-dependent widgets inside the cards. Resizing or teardown removes surplus copies.

Without JavaScript the track is a native horizontal flex rail. Absolute positioning is enabled only after the animation initializes. Keep that fallback, the viewport's clipped overflow in motion mode, and touch-action: pan-y so a vertical touch gesture can still scroll its parent page. No device-orientation permission is needed: this is a swipe rail.

Options

Attribute Values Default Description
data-squiggle Root hook Required Scopes one independent gallery
data-squiggle-amplitude 01.3 1 Responsive wave depth multiplier
data-squiggle-prev Button hook Optional Browse backward
data-squiggle-next Button hook Optional Browse forward
data-squiggle-position Text hook Optional Current position and product count
data-squiggle-path SVG path hook Optional Visible winding guide
data-squiggle-buy Product ID Optional Emits the product action event
data-squiggle-live Status hook Optional Demo bag feedback; use role="status"

Accessibility

Previous/next buttons, left/right arrow keys, pointer drag, touch swipe and wheel input browse the rail. Focusing a visible product action brings its card into view. Cards fully outside the stage are inert so they do not create invisible tab stops. A swipe suppresses the resulting click. Product buttons have explicit accessible names; focus receives the same treatment as hover and a visible outline.

Reduced motion removes the animated path and uses a scrollable product rail with working controls and product actions. With JavaScript disabled, products remain readable and horizontally scrollable; connect commerce actions to your own progressively enhanced forms if purchases must also work without scripting.

Dependencies

  • GSAP 3.15.0 core; no plugins or Lenis required.
  • Mona Sans from Google Fonts is optional demo typography.
  • Product photographs are bundled as WebP; replace them with your own product assets.

Teardown

JavaScript — before removing this demo in an SPA:

Code snippet omitted: it ships with the download.

Cleanup removes the ticker, pending snap, event listeners, resize/intersection observers, pointer capture and animation styles. This global context handle is for the standalone demo; retain a separate context handle per mounted instance in a component application.

Worked examples, the events and programmatic API, and the class reference ship with the download, alongside the full source.

Your cart

Your cart is empty

The Vault £99

Everything in the catalogue, plus everything we release next.