A tile whose photo moves slower than the page: as the tile scrolls through the viewport the image slides inside its frame, revealing more of itself, while a caption on top moves at a third speed in the other direction. The offset comes from the tile's position, so it is exact at any scroll speed.
Placeholder photos by Daniel Jacob and Reinis Birznieks on Unsplash. Replace them with your own before launch.
`p = (frameCentre − viewportCentre) / viewportHeight` clamped to ±1; image `translateY(p × −14%)` on a 130 %-tall image; caption `translateY(p × 10%)`. Updated from a rAF scheduled by scroll and resize. The demo scrolls inside a 360 px stage so the element previews alone; on a page use the window.
From prompt to a block in your page.
The preview is the shipped element inside a neutral demo page. Hover, click, focus: the one interaction it is about is live.
Token sets re-tint it live. The prompt carries the one you chose.
A paste-in snippet, or a component for Next.js, React, Vue, Astro, WordPress, Shopify or Webflow.
It quotes the markup, styles and script verbatim with the tokens and the rules that keep it self-contained.
It inherits your page's font and width; the tokens live on :root; several instances share one script.