Skip to content

feat(playground): add sneaker drop smooth-scroll demo - #555

Closed
Dvi-Rayal wants to merge 1 commit into
darkroomengineering:mainfrom
Dvi-Rayal:feat/playground-sneaker-demo
Closed

Dvi-Rayal wants to merge 1 commit into
darkroomengineering:mainfrom
Dvi-Rayal:feat/playground-sneaker-demo

Conversation

@Dvi-Rayal

Copy link
Copy Markdown

What

Adds playground/sneaker/, a standalone static demo of Lenis driving a product-launch style page (a fictional sneaker brand, "KODO Pulse 01"). It's three files (index.html, style.css, main.js) with no build step and no image assets. The sneaker is an inline SVG built in main.js, so it can be recoloured through CSS custom properties.

Why

The existing playground pages test individual features one at a time. This one shows the patterns people actually build on top of Lenis, all working together in one realistic page:

  • Pinned exploded view: a position: sticky section where scroll progress separates the shoe's SVG layers and steps through a spec list.
  • Vertical → horizontal track: a pinned colorway carousel. Section height is derived from the track width.
  • Velocity-reactive marquees: speed, direction and skew come from lenis.velocity / lenis.direction.
  • Word-by-word reveal, hero parallax driven by one CSS variable (--hp), and a nav that hides on scroll down.
  • Lenis APIs used: anchors: true for in-page links, lenis.stop() / start() around the intro, and lenis.scrollTo() for "back to top", the bag button and keyboard focus inside the horizontal track.

Every scroll-linked effect reads lenis.scroll inside a single RAF loop. Section offsets are cached on resize, so the loop doesn't trigger layout reads.

Notes for reviewers

  • Lenis comes from the CDN, not the local build: lenis@1.3.26 is loaded from jsDelivr with SRI hashes, so the page opens without a build. The other static.html demos point at ../../dist/lenis.min.js. I can switch to that if you'd rather it exercise the local build.
  • Not an Astro page: it's not wired into the Astro playground nav. Open playground/sneaker/index.html directly or serve the folder.
  • Accessibility: reduced motion turns off the autonomous animations (marquee drift, float, intro, count-up); Lenis's own respectReducedMotion default handles scrolling. Focus moves to the anchor target, and tabbing into an off-screen colorway card scrolls it into view.
  • Overflow: main uses overflow-x: clip rather than hidden (on body it gets propagated to the viewport), so sticky keeps working and mobile Chrome doesn't widen the layout viewport.
  • Checks: biome check playground/sneaker passes. Manually tested in Chromium at 1280×800, 758×960 and 375×812, with no console errors and no horizontal overflow at any scroll depth.

🤖 Generated with Claude Code

Standalone static page in playground/sneaker showing Lenis driving a
product-launch style site: pinned exploded view, vertical-to-horizontal
colorway track, word-by-word reveal, velocity-reactive marquees and
scroll-linked parallax, all read from lenis.scroll in a single RAF loop.

Loads lenis@1.3.26 from jsDelivr (with SRI) so it opens without a build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Dvi-Rayal
Dvi-Rayal requested a review from a team as a code owner October 9, 2026 21:11
@vercel

vercel Bot commented Oct 9, 2026

Copy link
Copy Markdown

@Dvi-Rayal is attempting to deploy a commit to the Darkroom Team on Vercel.

A member of the Team first needs to authorize it.

@Dvi-Rayal Dvi-Rayal closed this Oct 9, 2026
@Dvi-Rayal
Dvi-Rayal deleted the feat/playground-sneaker-demo branch October 9, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant