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

scroll-dynamics-pro

v1.5.0

Published

A lightweight, production-ready React scrolling library with no dependencies.

Readme

scroll-dynamics-pro

A lightweight, production-ready React library for mixed vertical and horizontal scrolling. Zero dependencies, 60FPS performance, and native sticky positioning.

Features

  • Mixed Scrolling: Seamlessly switch between vertical and horizontal scrolling sections.
  • Scroll Restore: Maintains correct horizontal position on page reload (no jumps).
  • High Performance: Uses requestAnimationFrame and direct DOM manipulation (no React state thrashing).
  • Optimization: Uses IntersectionObserver to only run logic when sections are in view.
  • Lightweight: No heavy animation libraries (GSAP/Framer Motion).

Installation

npm install scroll-dynamics-pro
# or
yarn add scroll-dynamics-pro

Usage

Wrap your application (or just the scrolling area) in ScrollProvider, then use ScrollSection to create scrollable areas.

import React from "react";
import {
  ScrollProvider,
  ScrollSection,
  ScrollTransform,
} from "scroll-dynamics-pro";

const App = () => {
  return (
    <ScrollProvider>
      {/* Normal Vertical Content */}
      <ScrollSection direction="vertical">
        <div
          style={{ height: "100vh", background: "#f0f0f0", padding: "50px" }}
        >
          <h1>Welcome to the Scroll Experience</h1>

          <ScrollTransform effect="fade">
            <h2>I fade in as I scroll up!</h2>
          </ScrollTransform>

          <ScrollTransform effect="parallax" speed={0.5}>
            <div
              className="parallax-box"
              style={{
                background: "purple",
                padding: "20px",
                marginTop: "50px",
                color: "white",
              }}
            >
              I move slower than the scroll!
            </div>
          </ScrollTransform>
        </div>
      </ScrollSection>

      {/* Horizontal Scroll Section */}
      {/* trackLength="300vw" means the user needs to scroll 2 viewport heights 
          to move through the 3 viewports worth of content. */}
      <ScrollSection direction="horizontal" trackLength="300vw">
        <div className="card" style={{ width: "100vw", background: "red" }}>
          Slide 1
        </div>
        <div className="card" style={{ width: "100vw", background: "blue" }}>
          Slide 2
        </div>
        <div className="card" style={{ width: "100vw", background: "green" }}>
          Slide 3
        </div>
      </ScrollSection>

      {/* More Vertical Content */}
      <ScrollSection direction="vertical">
        <div style={{ height: "100vh", background: "#e0e0e0" }}>
          <h2>The End</h2>
        </div>
      </ScrollSection>
    </ScrollProvider>
  );
};

export default App;

API

<ScrollProvider>

Tracks global scroll position. Must wrap all ScrollSection components.

<ScrollSection>

| Prop | Type | Default | Description | | ------------- | ---------------------------- | ------------ | ----------------------------------------------------------------------------------------------- | | direction | 'vertical' \| 'horizontal' | 'vertical' | The scroll direction. | | trackLength | string | '300vw' | Total height of the scroll track (only for horizontal). Determines how long the scroll "lasts". | | className | string | | CSS class for the section container. | | style | object | | Inline styles for the section container. |

<ScrollTransform>

Animates children based on scroll position.

| Prop | Type | Default | Description | | ----------- | --------------------------------------------- | ------------ | ----------------------------------------------------------------- | | effect | 'parallax' \| 'fade' \| 'scale' \| 'custom' | 'parallax' | The animation effect to apply. | | speed | number | 0.2 | (Parallax only) Speed factor relative to scroll. | | range | [number, number] | [0, 1] | Range of viewport traversal [0=enter, 1=leave] for interpolation. | | transform | function | | Custom transform function (element, progress, scrollY) => void. |

License

MIT