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

butterscroll-react

v1.0.4

Published

A smooth, customizable scroll component for React.

Readme

🧈 ButterScroll React (butterscroll-react)

A buttery smooth scrolling solution for React applications.

NPM version
GitHub stars
License


🎉 A Huge Thanks to the react-custom-scrollbars Community!

butterscroll-react is built on top of react-custom-scrollbars, an amazing library that provides flexible and customizable scrollbars for React applications.

🙏 A big shoutout to:

  • The original developer Malte Wessel (@malte-wessel)
  • The maintainers and all contributors who have kept this project alive
  • Everyone who has improved and shared their knowledge in the open-source community

This package wouldn’t be possible without the foundation laid by react-custom-scrollbars, and we appreciate all the effort that has gone into making scrolling in React smoother and more customizable! 🚀✨


🚀 Features

✔️ Smooth Physics-Based Scrolling
✔️ Customizable Damping & Friction
✔️ Supports Nested Scroll Containers
✔️ Simple Hook & Component API


📦 Installation

Install butterscroll-react via NPM or Yarn:

npm install butterscroll-react
# OR
yarn add butterscroll-react

🔥 Usage

1️⃣ Using the ButterScrollContainer Component

A plug-and-play solution for smooth scrolling.

import React from 'react';
import { ButterScrollContainer } from 'butterscroll-react';

export default function App() {
  return (
    <ButterScrollContainer options={{ damping: 0.1, friction: 0.15 }}>
      <div style={{ height: '200vh', padding: '1rem' }}>
        <h1>Butter Smooth Scrolling! 🧈</h1>
        <p>Experience the smoothness!</p>
      </div>
    </ButterScrollContainer>
  );
}

2️⃣ Using the useButterScroll Hook

For advanced control over existing react-custom-scrollbars instances.

import React, { useRef } from 'react';
import { Scrollbars } from 'react-custom-scrollbars';
import { useButterScroll } from 'butterscroll-react';

export default function CustomScrollComponent() {
  const scrollbarsRef = useRef(null);

  useButterScroll(scrollbarsRef, { damping: 0.1, friction: 0.2 });

  return (
    <Scrollbars ref={scrollbarsRef} style={{ height: '100vh', width: '100vw' }}>
      <div style={{ height: '200vh', padding: '1rem' }}>
        <h1>Custom Smooth Scroll 🏎️</h1>
      </div>
    </Scrollbars>
  );
}

⚙️ Options

Both ButterScrollContainer and useButterScroll accept the following options:

| Option | Type | Default | Description | |-------------|--------|---------|-------------| | damping | number | 0.1 | Controls scroll acceleration. Higher values make it more sensitive. | | friction | number | 0.15 | Reduces velocity over time, controlling how fast scrolling slows down. | | deltaLimit| number | 0.5 | Minimum scroll velocity before stopping. |


🏗 Handling Nested Scroll Containers

If a ButterScrollContainer is inside another, the inner one prevents the outer one from scrolling when active.

<ButterScrollContainer options={{ damping: 0.08, friction: 0.12 }}>
  <div style={{ height: '300vh', padding: '1rem', background: '#f4f4f4' }}>
    <h1>Outer Scroll</h1>

    <div style={{ height: '300px', overflow: 'hidden', border: '1px solid black' }}>
      <ButterScrollContainer options={{ damping: 0.1, friction: 0.2 }}>
        <div style={{ height: '500px', padding: '1rem', background: '#ddd' }}>
          <h2>Inner Scroll</h2>
        </div>
      </ButterScrollContainer>
    </div>

  </div>
</ButterScrollContainer>

🛠 Development & Contributions

If you’d like to contribute, feel free to fork the repo and submit a PR.

📌 GitHub Repository:
🔗 GitHub - KoushikEng/butterscroll-react

git clone https://github.com/KoushikEng/butterscroll-react.git
cd butterscroll-react
npm install
npm run build

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.


💡 Enjoy the buttery smooth scrolling experience! 🧈✨