🏪

Scroll Animation for BigCommerce: Add Premium Animation to Your Store

BigCommerce powers some of the largest online stores in the world. Adding scroll-driven animation differentiates your storefront from competitors using stock themes. This guide shows you both the hard way (custom Stencil theme code) and the easy way (paste the ScrollerSites embed).

Manual Implementation
38 lines
// Manual scroll animation on BigCommerce — 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, Stencil theme injection,
// CDN setup for 120+ JPEG files, lazy loading...
preloadFrames(120).then(() => drawFrame(0));

Why Add Scroll Animation to BigCommerce

BigCommerce stores tend to compete on selection and price — but premium brands compete on experience. Scroll-driven animation on your hero product or homepage signals quality before the customer reads a word.

  • Animate your hero product on the homepage to set a premium tone
  • Use scroll animation on landing pages for paid traffic campaigns
  • Add it to category pages for high-margin collections

How to Embed Scroll Animation in BigCommerce

BigCommerce supports HTML widgets in the Page Builder, custom HTML in the Stencil theme, and script manager for site-wide injection. The ScrollerSites embed works with all three — no Stencil edits required for basic placement.

  • Use the Page Builder HTML widget for page-specific placement
  • Add the script via Script Manager for global access
  • Drop the embed into a Stencil custom region for theme-level control

Ready to Add Scroll Animation?

Skip the Stencil theme edits — upload your video and paste the ScrollerSites embed into any BigCommerce page.

Get Started Free →

Related Platform Guides

Related Articles