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

parabox.js

v2.0.2

Published

A parallax library to fluff your flat elements

Readme

Parabox.js

Rotates your elements in 3D space based on your mouse position.

Demo on Codepen

Usage

Install using NPM

npm install parabox.js

Then, just include it like any other module.

import parabox from 'parabox.js';

In-browser

  <!-- NOTE: for selecting specific versions (which you should ALWAYS do in production), see the docs on https://www.jsdelivr.com/ -->
  
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/parabox.js/dist/parabox.css">
  <script src="https://cdn.jsdelivr.net/npm/parabox.js/dist/parabox.js"></script>

Or, use the files

First, download and build the files.

  git clone https://github.com/JosNun/parabox.js.git
  npm install
  npm run build

Then get the files from the dist/ and put them in your project and link 'em up.

  <link rel="stylesheet" type="text/css" href="./parabox/parabox.css">
  
  <script src="./parabox/parabox.js"></script>
  // Optionally, if your environment supports ES modules, you can include Parabox.js as a module
  
  // Via CDN
  <script type="module">
    import parabox from 'https://cdn.jsdelivr.net/npm/parabox.js/dist/parabox.es.js';
  </script>
  
  // Or via file
  <script type="module">
    import parabox from './parabox.es.js';
  </script>

HTML Structure

<div class="parabox-container">
  <div class="parabox">
    <h1 class="parabox-shift">Hey there! I seem to stand out.</h1>
    <p>This content appears flat against the card</p>
  </div>
</div>

Each parabox needs to be inside a container with a perspective. The parabox-container class does this, and is provided for convenience, but is not necessary if another parent has a perspective.

Parabox children with the class parabox-shift will move based on the tilt of the parent parabox.

Initialization

To get everything running, you just need to initialize parabox.

parabox.init();

If you add Parabox elements after initializing Parabox, you will need to rerun the init function for them to work.

Options

Magnitude

The amount that a parabox element shifts can be adjusted by adding a magnitude value, either inline via data attributes, or with custom CSS properties. Supplying a negative number inverts the effect. Default value is 1.

  <style>
    .magnified {
      --parabox-magnitude: 5;
    }
  </style>

  <div class="parabox">I'm a normal parabox</div>
  <div class="parabox" data-parabox-magnitude="5">The effect of your hover is magnified for me!</div>
  
  <div class="parabox magnified">The effect of your hover is also magnified for me!</div>

Height

Shifted elements can have their "height" adjusted, so they appear closer or further to the parabox when shifted. Negative values invert the element translation. Default is 5.

  <style>
    .shiftier {
      --parabox-height: 10;
    }
  </style>

  <div class="parabox">
    <p class="parabox-shift">I'm a normal-height element.</p>
    <p class="parabox-shift shiftier">I appear to stand out further than my siblings!</p>
    <p class="parabox-shift" data-parabox-height="0">I appear to be flat against my parent. The same as not having a class of parabox-shift.</p>
  </div>

Developing

Clone the repo

git clone https://github.com/JosNun/parabox.js.git

Install the dependencies

npm install

Run the dev server to rebuild when the files in src/ change.

npm run dev

Pull requests welcome :)

License

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