🛒

Scroll Animation for Shopify: The Complete Guide (2026)

Shopify makes it easy to launch a store, but default themes feel static. Apple uses scroll-driven animation to make every product feel premium — and your Shopify store can do the same. This guide walks you through both approaches: the full manual implementation (so you understand the complexity) and the ScrollerSites embed that handles it for you.

Manual Implementation
38 lines
// Manual scroll animation on Shopify — 47+ lines before mobile
const canvas = document.getElementById('scroll-canvas');
const ctx = canvas.getContext('2d');
const frames = [];
let currentFrame = 0;

async function preloadFrames(count) {
  await Promise.all(Array.from({ length: count }, (_, i) => {
    const img = new Image();
    const padded = String(i).padStart(4, '0');
    img.src = `https://your-cdn.com/frames/frame-${padded}.jpg`;
    frames.push(img);
    return new Promise((r) => { img.onload = r; img.onerror = r; });
  }));
}

function drawFrame(index) {
  if (!frames[index]) return;
  ctx.clearRect(0, 0, canvas.width, canvas.height);
  ctx.drawImage(frames[index], 0, 0, canvas.width, canvas.height);
}

window.addEventListener('scroll', () => {
  const rect = canvas.parentElement.getBoundingClientRect();
  const scrolled = -rect.top;
  const total = rect.height - window.innerHeight;
  const progress = Math.max(0, Math.min(1, scrolled / total));
  const frameIndex = Math.floor(progress * (frames.length - 1));
  if (frameIndex !== currentFrame) {
    currentFrame = frameIndex;
    requestAnimationFrame(() => drawFrame(currentFrame));
  }
}, { passive: true });

// Still needed: resize handler, mobile touch events,
// Safari canvas fix, Liquid theme injection,
// CDN setup for 120+ JPEG files, lazy loading...
preloadFrames(120).then(() => drawFrame(0));

Why Scroll Animation on Shopify Converts

Static product images ask customers to imagine the product. Scroll-driven animation lets them experience it — rotating a 3D render, unfolding a feature sequence, or revealing a before/after transition as they scroll.

The result: higher time-on-page, more scroll depth, and more "add to cart" clicks. The effect is strongest on hero sections and flagship product pages where you need to justify a premium price.

  • Replace your homepage hero banner with a scroll animation to hook visitors immediately
  • Add a 360° product rotation sequence on your top-revenue SKU
  • Animate a feature breakdown — each scroll step reveals one benefit
  • Show a before/after comparison that unfolds as the user scrolls

The Hard Way: Manual Scroll Animation on Shopify

To add scroll animation to Shopify without a tool, you need to: extract frames from a video (~120 JPEGs), host them on a CDN, write a custom scroll listener, use canvas to paint frames, and handle mobile separately. You also need to edit your Liquid theme to inject the canvas element and the script.

This is a multi-day engineering project — and the maintenance cost is real. Every time you change the animation, you re-extract frames, re-upload to your CDN, and re-test mobile.

  • Extract frames from your source video using FFmpeg (~120 frames at 60fps × 2s)
  • Upload all frames to a CDN like Cloudflare R2 or AWS S3
  • Write the canvas-based scroll controller (47+ lines of JavaScript)
  • Inject the controller into theme.liquid or a Custom HTML section
  • Test responsive breakpoints, mobile touch behavior, and Safari edge cases

With ScrollerSites: Paste Two Lines

Upload your product video or image sequence to ScrollerSites. We extract the frames, host them on our global CDN, and give you a two-line embed snippet. Paste it into your Shopify theme — in a Custom HTML section, a Liquid block, or directly in `theme.liquid` — and you're done.

No frame hosting, no canvas code, no scroll math. The embed handles mobile responsiveness, lazy loading, and CDN delivery automatically.

  • Upload a `.mp4` or `.mov` — ScrollerSites extracts up to 300 frames
  • Add the embed snippet to a Custom HTML section in the Shopify theme editor
  • Set scroll speed, loop behavior, and CTA overlays from the dashboard
  • Replace the source video any time — the embed snippet stays the same

Best Pages to Add Scroll Animation on Shopify

Hero sections convert best — visitors land there first, and a scroll-driven animation immediately differentiates your store. Product pages are second: place the animation above the fold and let it play as the customer scrolls toward the buy button.

Collection pages and Shopify-built landing pages also support the ScrollerSites embed via Custom HTML sections.

  • Homepage hero: replace a static banner with a scroll animation
  • Top product pages: above-the-fold animation → description → reviews flow
  • Landing pages: feature showcase that animates section by section
  • Seasonal campaign pages: animated product reveal for launches

Ready to Add Scroll Animation?

Upload your product video and get a Shopify-ready embed in minutes — no Liquid editing, no frame hosting, no JavaScript.

Get Started Free →

Related Platform Guides

Related Articles