npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@chunsky/react-sequ

v1.0.2

Published

React canvas image sequence animation with scroll control

Readme

react-sequ

A lightweight React component for rendering high-performance image sequence animations using HTML5 Canvas.

react-sequ allows you to create smooth image sequence animations with support for autoplay, manual frame control, and progress-based animation. It works well for landing pages, product showcases, interactive storytelling, and scroll-driven experiences.


Installation

npm install @chunsky/react-sequ

Import

import { ImageSequence } from "@chunsky/react-sequ";
import "@chunsky/react-sequ/styles.css";

JavaScript (JSX)

Basic Usage

import { ImageSequence } from "@chunsky/react-sequ";
import "@chunsky/react-sequ/styles.css";

export default function App() {
  return (
    <ImageSequence
      src="/frames"
      prefix="frame-"
      extension="jpg"
      start={0}
      end={240}
      padding={3}
      scrollControl
      className="animation"
    />
  );
}

TypeScript (TSX)

Basic Usage

import { ImageSequence } from "@chunsky/react-sequ";
import "@chunsky/react-sequ/styles.css";

export default function App() {
  return (
    <ImageSequence
      src="/frames"
      prefix="frame-"
      extension="jpg"
      start={0}
      end={240}
      padding={3}
      scrollControl
      className="animation"
    />
  );
}

CSS (Recommended)

When using scrollControl, create a scrollable section for the animation.

.hero-section {
  height: 500vh;
}

.hero {
  position: sticky;
  top: 0;
  height: 100vh;
}

.animation {
  width: 100%;
  height: 100%;
}

Then use the component like this:

<section className="hero-section">
  <div className="hero">
    <ImageSequence
      src="/frames"
      prefix="frame-"
      extension="jpg"
      start={0}
      end={240}
      padding={3}
      scrollControl
      className="animation"
    />
  </div>
</section>

The 500vh value determines how much scroll distance is available for the animation. You can increase or decrease it depending on how long you want the animation to play.


Scroll Animation

react-sequ does not include its own scroll engine.

Simply pass a value between 0 and 1 to the progress prop. This value can come from:

  • Native scroll events
  • GSAP ScrollTrigger
  • Framer Motion
  • Lenis
  • locomotive-scroll
  • React Spring
  • Any animation library

Example:

<ImageSequence
  src="/frames"
  prefix="frame-"
  extension="jpg"
  start={0}
  end={240}
  padding={3}
  progress={progress}
/>

Manual Frame Control

Display a specific frame directly.

<ImageSequence
  src="/frames"
  prefix="frame-"
  extension="jpg"
  start={0}
  end={240}
  padding={3}
  frame={120}
/>

Using an Array of Images

<ImageSequence
  sources={[
    "/frames/000.jpg",
    "/frames/001.jpg",
    "/frames/002.jpg",
    "/frames/003.jpg"
  ]}
/>

Using a Path Template

Using ####

<ImageSequence
  path="/frames/frame-####.jpg"
  start={0}
  end={240}
/>

Using {index}

<ImageSequence
  path="/frames/frame-{index}.jpg"
  start={0}
  end={240}
  padding={3}
/>

Folder Structure

public/
└── frames/
    ├── frame-000.jpg
    ├── frame-001.jpg
    ├── frame-002.jpg
    └── ...

Props

| Prop | Type | Default | Description | | ---------------- | ----------------------- | ---------------------------- | ----------------------------------------- | | sources | string[] | — | Explicit image URL array. | | path | string | — | Image template using #### or {index}. | | src | string | — | Image directory. | | prefix | string | "" | Filename prefix. | | extension | string | — | Image extension. | | start | number | — | First frame. | | end | number | — | Last frame. | | padding | number | 0 | Zero-padding width. | | progress | number | — | Animation progress (01). | | frame | number | — | Display an exact frame. | | autoPlay | boolean | false | Enable automatic playback. | | fps | number | 24 | Playback speed. | | fit | "cover" | "contain" | "cover" | Canvas image fitting mode. | | className | string | "" | CSS class applied to the canvas. | | style | CSSProperties | — | Inline styles for the canvas. | | alt | string | "Image sequence animation" | Accessible label. | | onLoadProgress | function | — | Loading progress callback. | | onFrameChange | function | — | Called whenever the frame changes. |


Browser Support

  • Chrome
  • Edge
  • Firefox
  • Safari

License

MIT


Author

Created by Chunsky


💖 Support

If you enjoy using React Sequ, you can support its development:

Your support helps maintain the project, improve features, fix bugs, and continue developing open-source software.