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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@redbeed/parallax-interface

v1.0.0

Published

A lightweight and flexible library for adding mouse-driven parallax effects to your HTML elements, enhancing UI depth and user engagement in any project.

Downloads

11

Readme

pxi-header.gif

Parallax Interface (PXI)

PXI is a lightweight and flexible library for adding mouse-driven parallax effects to your HTML elements, enhancing UI depth and user engagement in any project.

The whole Project is inspired by the iPad Mouse Hover Effect.

Installation

npm install @redbeed/parallax-interface

Usage

import ParallaxInterface from 'parallax-interface';

ParallaxInterface.init();

// or with custom options
ParallaxInterface.init({
    throttleTime: 16, // Throttle time in milliseconds (60fps)
    hitzoneFactor: 1, // Factor for the hitzone size
    mouseMoveFactor: 0.5, // Factor for the mousemove movement
    animationTime: 500, // Animation time in milliseconds
    calculateSize: false, // If true, the wrapper and the element will have a fixed size (based on the element's size)
});

Or you can add the following script to your project directly.

<script src="https://unpkg.com/@redbeed/parallax-interface/dist/parallax-interface.min.js"></script>

HTML

You need to add data-pax to your main element and data-pe-factor to the elements you want to add the parallax effect to.

<a href="#" data-pax>
    <span data-pe-factor>I am a link</span>
</a>

<!-- or with custom options -->
<a href="#" data-pax data-pe-hitzone="1.2">
    <span data-pe-factor="0.5">I am a link</span>
</a>

CSS

To make the parallax effect work, you should add our small CSS snippet to your project.

import 'parallax-interface/dist/parallax-interface.css';

Or you can add the following CSS to your project directly.

<link rel="stylesheet" href="https://unpkg.com/@redbeed/parallax-interface/dist/parallax-interface.css"/>

Troubleshooting

Inline Block Elements

You need to add display: inline-block to your inline elements like span or a, if you want to add the parallax effect.

Contributing

Everyone is welcome to contribute to this project. Create a pull request or an issue if you find something that could be improved.

Support

If you like this project, please consider supporting it by giving it a star.

redbeed is a web development agency from Germany, with love for open source projects. You can find more information about us on our website redbeed.com.

License

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