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

scrollfeather

v1.2.9

Published

A lightweight and smooth scrolling library. Works for both full-page and container-based scrolling also supports all devices.

Readme

FeatherScroll

FeatherScroll is a lightweight, smooth scrolling library designed for full device support and easy integration. It provides advanced scrolling features such as parallax effects, sticky elements, and smooth animations without requiring additional dependencies.

🚀 Features

  • Smooth Scrolling: Automatically enables smooth scrolling when included.
  • Supports Multiple Scrollable Areas: Works with multiple content sections on a single page.
  • Parallax Scrolling: Apply horizontal and vertical scroll effects.
  • Sticky Elements: Keep elements fixed within their parent while scrolling.
  • Scroll Direction Detection: Identify whether the user is scrolling up or down.
  • Fully Configurable: Customize scroll speed, easing, and gestures.
  • Integration with GSAP ScrollTrigger: Seamless compatibility for advanced animations.

📦 Installation

Using NPM

npm install scrollfeather

Using JSDelivr (CDN)

<script src="https://cdn.jsdelivr.net/npm/scrollfeather/featherScroll.js"></script>

FeatherScroll will be automatically available globally as FeatherScroll.


🛠️ Basic Usage

1️⃣ Include FeatherScroll in Your Project

<script src="https://cdn.jsdelivr.net/npm/scrollfeather/featherScroll.js"></script>

2️⃣ Initialize FeatherScroll

Feather Scroll doesn't need any extra options for basic smooth scrolling initialization

const scroll = new FeatherScroll();

⚙️ Options

You can customize FeatherScroll with various options:

const scroll = new FeatherScroll({
  smooth: true, // Enable smooth scrolling
  duration: 1.2, // Scroll duration (seconds)
  easing: (t) => 1 - Math.pow(1 - t, 3), // Easing function
  direction: 'vertical', // 'vertical' | 'horizontal'
  gestureDirection: 'both', // Mouse/touch gesture control
  mouseSensitivity: 1, // Sensitivity for wheel scrolling
  touchSensitivity: 2, // Sensitivity for touch scrolling
  infinite: false // Infinite scrolling
});

📌 Sticky Elements

To make an element sticky within its parent, add the data-scroll-sticky attribute:

<div class="parent">
    <div class="sticky" data-scroll-sticky>I'm a sticky element!</div>
</div>

The element will remain fixed inside its parent container while scrolling.


🎭 Parallax Scrolling

Apply a scroll speed effect using data-scroll-speed:

<div data-scroll-speed="0.5">This moves slower.</div>
<div data-scroll-speed="1.5">This moves faster.</div>

Apply horizontal scrolling using data-scroll-direction="horizontal":

<div data-scroll-speed="1" data-scroll-direction="horizontal">This moves sideways.</div>

You can combine both:

<div data-scroll-speed="1" data-scroll-direction="both">Moves in diagonally!</div>

🔄 Scroll Direction Detection

You can detect whether the user is scrolling up or down using an event listener:

document.addEventListener('scroll', () => {
  const direction = scroll.getScrollDirection();
  console.log(`Scrolling ${direction}`);
});

This will return 'up' or 'down' based on the user's scroll behavior.


🎯 Scroll to Specific Section

You can scroll to any element or position programmatically:

scroll.scrollTo('#section', { offset: -50, duration: 1 });

🎬 GSAP ScrollTrigger Integration

If GSAP ScrollTrigger is included, FeatherScroll will automatically sync with it:

gsap.registerPlugin(ScrollTrigger);
const scroll = new FeatherScroll();
ScrollTrigger.defaults({ scroller: scroll.wrapper });

🛑 Controlling Scroll Behavior

Start or Stop Smooth Scrolling

scroll.start(); // Enable smooth scrolling
scroll.stop();  // Disable smooth scrolling

Destroy FeatherScroll

scroll.destroy();

🛠️ Updating Options Dynamically

You can update the scroll options dynamically:

scroll.updateOptions({ duration: 2, smooth: false });

This allows you to modify scroll settings without reinitializing the instance.


🌍 Supporting Multiple Scroll Instances

FeatherScroll supports multiple scrolling areas:

const scroll1 = new FeatherScroll({ wrapper: '.container1', content: '.content1' });
const scroll2 = new FeatherScroll({ wrapper: '.container2', content: '.content2' });

📜 License

FeatherScroll is open-source under the MIT License.


🤝 Contributing

If you want to contribute, feel free to submit pull requests on GitHub.


❤️ Support FeatherScroll

If you find FeatherScroll useful and would like to support its development, consider donating:

Your support helps keep this project alive and improving! 🚀


📧 Need Help?

For questions or issues, create a GitHub issue or reach out to me!