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

react-scroll-collision

v1.0.5

Published

[![npm version](https://badge.fury.io/js/react-scroll-collision.svg)](https://badge.fury.io/js/react-scroll-collision)

Readme

react-scroll-collision

npm version

A react component that provide a High Order Component to wrap fixed element that have to cross different color section.

Getting Started

A new class will be added to the wrapped element when entering in specific section. You will be able that way to change text color, svg fill or stroke color or whatever you want by only set css paramters into the provided className.

To identify specific section, just put "data-clippath=" followed by the class name you want to assign to the wrapped element.

This project was inspired by https://github.com/salsita/jq-clipthru and is fully developped with React (PureComponent with state management).

No JQuery.

Installing

A step by step series of examples that tell you how to get a development env running

Say what the step will be

npm install --save react-scroll-collision

Usage

import ReactScrollCollision from 'react-scroll-collision'; // The import name is up to you 

Example

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import ScrollCollision from 'react-scroll-collision';

const App = () => (
    <div>
        <ScrollCollision className="Elem1">Test element fixed bottom left</ScrollCollision>
        <ScrollCollision className="Elem2">Top center</ScrollCollision>
        <ScrollCollision className="Elem3">Bottom Right</ScrollCollision>

        <div className="Block-White">
          
        </div>
        <div className="Block-Black" data-clippath="ColorWhite">
        
        </div>
        <div className="Block-White">
        
        </div>
        <div className="Block-Black" data-clippath="ColorGray">
        
        </div>
        <div className="Block-White">
        
        </div>
      </div>
);

ReactDOM.render(<App />, document.getElementById('root'));

.Block-White,
.Block-Black {
  width: 100%;
  height: 50vh;
}

.Block-White {
  background: white;
}

.Block-Black {
  background: black;
}

.ColorWhite{
  color: white;
  fill: white;
}

.ColorGray{
  color: lightgray;
  fill:gray;
}

.Elem1 {
  position: fixed;
  top: 25%;
  left: 10%;
  height: 20px;
  width: 300px;
}

.Elem2 {
  position: fixed;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  height: 17px;
  width: 150px;
}

.Elem3 {
  position: fixed;
  top: 25%;
  right: 10%;
  height: 20px;
  width: 150px;
}

.ElemSVG {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  height: 100px;
  width: 100px;
}

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc