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

@abhilashsahoo/parallax

v2.0.1

Published

Parallax scrolling — vanilla JS, works with Node, React, jQuery, or any JS

Readme

Parallax.js

Parallax scrolling effect — works with vanilla JS, Node, React, jQuery, or any JS environment.

Author: Abhilash Sahoo
Repository: github.com/abhilashsahoo/parallax

Install

npm install @abhilashsahoo/parallax

jQuery is optional. Install it only if you want to use the jQuery API ($.fn.parallax).


Usage

Vanilla JS / Any framework

Pass a DOM element and options. No jQuery required.

import { init, destroy } from '@abhilashsahoo/parallax';

const el = document.querySelector('.parallax-window');
init(el, { imageSrc: '/path/to/image.jpg', speed: 0.3 });

// Later: destroy(el);

React

Use a ref and useEffect:

import { useRef, useEffect } from 'react';
import { init, destroy } from '@abhilashsahoo/parallax';

function ParallaxSection({ imageSrc, speed = 0.2 }) {
  const ref = useRef(null);

  useEffect(() => {
    if (!ref.current) return;
    init(ref.current, { imageSrc, speed });
    return () => destroy(ref.current);
  }, [imageSrc, speed]);

  return <div ref={ref} className="parallax-window" style={{ minHeight: '100vh', background: 'transparent' }} />;
}

jQuery

If jQuery is present, the plugin is attached automatically:

$('.parallax-window').parallax({ imageSrc: '/path/to/image.jpg' });

Browser script tag (no build)

Include the script; jQuery is optional. Elements with data-parallax="scroll" are initialised automatically.

<script src="parallax.js"></script>
<!-- Optional: <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> -->

<div class="parallax-window" data-parallax="scroll" data-image-src="/path/to/image.jpg"></div>

Styling

Parallax elements must be transparent so the effect is visible. Give the container a minimum height:

.parallax-window {
  min-height: 400px;
  background: transparent;
}

Options

| Option | Type | Default | Description | |-----------------|---------|-----------|-------------| | imageSrc | string | null | Path to the parallax image. | | naturalWidth | number | auto | Image width (optional). | | naturalHeight | number | auto | Image height (optional). | | position | string | center center | Like CSS background-position. | | positionX | string | center | Horizontal position. | | positionY | string | center | Vertical position. | | speed | float | 0.2 | Parallax speed (0 = fixed, 1 = same as scroll). | | zIndex | number | -100 | z-index of the mirror element. | | bleed | number | 0 | Extra pixels to hide scroll jitter. | | iosFix | boolean | true | Static background on iOS. | | androidFix | boolean | true | Static background on Android. | | overScrollFix | boolean | false | Fix over-scroll in Safari. | | mirrorContainer | string | 'body' | Selector for the mirror container. |

Data attributes: data-image-src, data-speed, data-z-index, etc. (camelCase → kebab-case).


License

MIT © Abhilash Sahoo