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

msc-scroll-fader

v1.0.0

Published

<msc-scroll-fader /> is a high-performance utility web component designed to enhance the visual presentation of scrollable containers. By leveraging modern CSS scroll-driven animations, it automatically applies smooth, dynamic edge fading gradients to ind

Readme

msc-scroll-fader

Published on webcomponents.org DeepScan grade

<msc-scroll-fader /> is a high-performance utility web component designed to enhance the visual presentation of scrollable containers. By leveraging modern CSS scroll-driven animations, it automatically applies smooth, dynamic edge fading gradients to indicate overflow content, significantly improving user experience without compromising native scrolling fluidness.

The component adapts seamlessly to different layout structures via the direction attribute. By specifying either vertical or horizontal, developers can instantly reconfigure the internal scrolling axis and masking vectors. As users scroll through the content, the edge indicators dynamically adjust their visibility in real time, providing intuitive visual cues that guide the user's eye and maintain design continuity across diverse viewport sizes.

<msc-scroll-fader />

Basic Usage

<msc-scroll-fader /> is a web component. All we need to do is put the required script into your HTML document. Then follow <msc-scroll-fader />'s html structure and everything will be all set.

  • Required Script

    <script
      type="module"
      src="https://unpkg.com/msc-scroll-fader/mjs/wc-msc-scroll-fader.js">        
    </script>
  • Structure

    Put <msc-scroll-fader /> into HTML document. It will have different functions and looks with attribute mutation.

    <msc-scroll-fader>
      <!-- put conteent here -->
      <h2>xxxx</h2>
      <p>xxxx</p>
    </msc-scroll-fader>

JavaScript Instantiation

<msc-scroll-fader /> could also use JavaScript to create DOM element. Here comes some examples.

<script type="module">
import { MscScrollFader } from 'https://unpkg.com/msc-scroll-fader/mjs/wc-msc-scroll-fader.js';

const template = document.querySelector('.my-content-template');

// use DOM api
const nodeA = document.createElement('msc-scroll-fader');
nodeA.appendChild(template.content.cloneNode(true));
document.body.appendChild(nodeA);

// new instance with Class
const nodeB = new MscScrollFader();
nodeB.appendChild(template.content.cloneNode(true));
document.body.appendChild(nodeB);
</script>

Style Customization

Developers could apply styles to decorate <msc-scroll-fader />'s looking.

<style>
msc-scroll-fader {
  --msc-scroll-fader-mask-size-start: 16px;
  --msc-scroll-fader-mask-size-end: 16px;
}
</style>

Attribute

<msc-scroll-fader /> component exposes a curated set of attributes, enabling developers to dynamically adjust the user interface. This provides the flexibility to tailor the component’s appearance to seamlessly adapt to any given context.

  • direction

The direction attribute configures the scrolling axis and layout orientation of <msc-scroll-fader />. The component currently supports two standard options: vertical and horizontal, defaulting to vertical.

<msc-scroll-fader
  direction="vertical"
>
  <!-- put conteent here -->
  <h2>xxxx</h2>
  <p>xxxx</p>
</msc-scroll-fader>

Property

| Property Name | Type | Description | | ----------- | ----------- | ----------- | | direction | String | Getter / Setter direction. direction configures the scrolling axis and layout orientation of <msc-scroll-fader />. The component currently supports two standard options: vertical and horizontal, defaulting to vertical. |

Reference