Runway lookbook section
A Shopify-ready runway where seven cut-out looks walk a looping line and every look opens its own rail of pieces to add to the cart.
Use it with Claude or any AI tool. Copy the prompt and paste it in. The link inside gives the AI the whole page as Markdown.
Live preview of the result built from this prompt. Click to pause.
Overview
A single-file runway lookbook for a fashion store, built as a web component with no libraries. Seven background-free model photos stand in a line that recedes into soft blur; the front look is sharp, and the line loops forever, so the look that walks off on the right quietly rejoins at the back. Shoppers move with the arrows, a drag or swipe, horizontal trackpad scroll, the keyboard or by tapping any model. Each look has its own product rail with a wishlist heart and an add-to-cart button that posts to Shopify’s /cart/add.js (a demo mode fakes it), and selecting a block in the Shopify theme editor jumps to that look. The demo is a festive Indian edit with INR prices and free Pexels photos; swap in your own looks and products.
Build it step by step
Sign in to tick steps off-
1
Stand the looks in a line
Build the section shell and place seven cut-out models on a stage so the front look is sharp and the rest recede, shrink and blur to the left.
Create a single-file HTML runway lookbook section for a fashion store. No libraries. Use a custom element <runway-lookbook class="rwl"> with a two-column grid: a stage on the left and a 300px product rail on the right, 640px tall, on a soft #edf1f6 background, set in Jost. Put seven .rwl__model elements in the stage, each holding a transparent full-length model photo standing on the bottom edge with a soft floor shadow. Write pose(d), where d is the distance from the front: the front model stands at 70% of the stage width; models behind move left with x = frontX - spread * (1 - 0.65^d), scale to 1 - 0.35d for the first and 0.65 * 0.78^(d-1) after, lift slightly, blur by (d - 0.8) * 1.9px and fade out after the fifth. Apply it with translate3d, scale, filter and opacity on a 0.95s cubic-bezier(.65,0,.2,1) transition. Add a FESTIVE EDIT 2026 title and a short intro top left.
Done when Seven looks stand in a receding line with the front one sharp and the rest smaller and blurred.
-
2
Walk the line, endlessly
Move through the looks with arrows, drag, swipe, trackpad and keys, and make the line loop so it never runs out.
Keep an unbounded position pos and an index. For model k use dist(k, pos) = mod(k - pos + 1) - 1, so distances wrap into [-1, count - 1): the look that walks off (d between -1 and 0 moves right, grows a little, blurs and fades) rejoins at the back. When a model wraps, place it at its new spot with no transition and re-enable transitions on the next frame, so it never slides across the stage. Add round previous/next arrows with a 01 / 07 counter, ArrowLeft/ArrowRight on the focused stage, horizontal wheel or shift+wheel (one step per 60px with a 450ms lock), and pointer drag: decide horizontal or vertical after 6px, capture the pointer, move the line live by dx / max(160, 38% of the width), then snap by distance or flick speed. Tapping a model further back brings it to the front by the shortest way round. Bottom left, show LOOK 15 with a slide-up label change and a Shop the look link.
Done when Arrows, drag, keys and taps all move the line, and after the last look the first one walks in again.
-
3
Give every look its own product rail
Show the pieces of the front look in the rail, with wishlist hearts and an add to cart that works on Shopify.
For each look add a .rwl__group in the rail with three product cards: a cut-out product photo on a light card, the name in small uppercase, the price in INR, a heart button top left (aria-pressed, fills red) and a round + add button bottom right. Only the active group is visible; its cards rise in one by one with an 80ms stagger. Shop the look focuses the rail and pulses its border (on phones it scrolls the rail into view). The add button posts { items: [{ id: variantId, quantity: 1 }], sections: 'cart-icon-bubble' } to Shopify.routes.root + 'cart/add.js', swaps in the returned cart bubble, refreshes [data-cart-count] from cart.js and fires a cart:refresh event. With data-demo on the element, skip the request and show a +1 cart pop instead. Fire runway:change and runway:added events, and in the Shopify theme editor jump to a look when its block is selected.Done when Each look shows its own three pieces, hearts toggle, and add to cart updates the count (or the demo counter).
-
4
Phone layout, dots and polish
Stack the rail under the stage on phones, add dots and a first-visit hint, preload upcoming looks and respect reduced motion.
Under 750px: stack the stage and rail, make the stage min(68svh, 560px) tall, put the front model at 64% with a wider spread, let a model take up to 52cqw, hide the counter and show pill dots at the top (the active dot stretches to 20px). Turn the rail into a 268px horizontal scroll-snap strip with cards at 44% width (52% under 380px). Show a Swipe to walk the line hint in the middle of the stage for a few seconds on load. Re-measure on resize with a ResizeObserver, eagerly load the next three looks' images when the index changes, pause autoplay on hover when data-autoplay is set, read data-start for the first look number, and cut transitions to near zero under prefers-reduced-motion. Make it accessible: a region with carousel roledescription, aria-live on the look label and aria-hidden on the models behind.
Done when On a phone you can swipe the line, see the dots and scroll the product strip; on desktop nothing changes.
Uses runway-lookbook.html
Files and links
-
runway-lookbook.html 42 KB The finished section. Put your transparent cut-outs in a photos/ folder (look-15.webp to look-21.webp, look-15-1.webp and so on), or it shows silhouettes.
What people built
Show yoursNobody has shared a build yet. Yours could be the first.
Show what you built
Built this plan? Sign in to share your demo video, live app and screenshots.