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

skewjs

v0.7.1

Published

Simple, lightweight, dependency free library for skewing DOM elements in pixels.

Readme

Skew is a dependency free JavaScript library for performing skew transformations of DOM elements measured in pixels. It allows to keep element's skew by the same amount of pixels and unskew its content.

GitHub release npm GitHub Github file size

Features:

  • calculation of skew transformation measured in pixels,
  • unskew element's content,
  • skew update on window resize,
  • dependency free,
  • can be used standalone with plain JavaScript or as jQuery plugin,
  • responsiveness - breakpoints definition,
  • configurable debouncing,
  • cross-browser - supports IE9+ and modern browsers,
  • lightweight - ~5kB minified.

NPM

npm install skewjs

CDN

https://www.jsdelivr.com/package/npm/skewjs

Getting started

Before closing <body> tag add:

<script type="text/javascript" src="skew.min.js"></script>
<!--CDN-->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/skew.min.js"></script>

Then add script:

window.onload = function() {
  var Skew = new Skew('selector', {x: 50});
}

or use jQuery:

$(function() {
  $('selector').skew({x: 50});
});

Syntax

JavaScript:

var skewObj = new Skew('selector', {option: value});
//example
var skewObj = new Skew('.skew', {x: 50, y: 100, breakpoints: [{break: 768, x: 30}]});

skewObject.method(argument);
//example
skewObj.update({x: 30, breakpoints: [{break: 768, x: 15}]});

jQuery:

$('selector').skew({option: value});
//example
$('.skew').skew({x: 50, y: 100, breakpoints: [{break: 768, x: 30}]});

$('selector').skew('method', argument);
//example
$('.skew').skew('update', {x: 30, breakpoints: [{break: 768, x: 15}]});

Options

Option | Type | Default | Description ------------ | ------------- | ------------ | ------------- x | int | 0 | Element's skew on x axis in pixels. y | int | 0 | Element's skew on y axis in pixels. unskewContent | bool/string | false | Element's content unskew option / css selector of element's content to unskew (see example) breakpoints | array | [] | Array of objects containing breakpoints and setting objects (see example). debounce | boolean | true | Debounce on resize event. debounceTime | int | 50 | Debounce time tollerance in ms. beforeSkew | array/function | [] | function/array of functions fired before skew (see events). afterSkew | array/function | [] | function/array of functions fired after skew (see events). beforeElementSkew | array/function | [] | function/array of functions fired before single element's skew (see events). afterElementSkew | array/function | [] | function/array of functions fired after single element's skew (see events).

Unskew option example

//Unskew element's content
var skewObj = new Skew(
  '.skew',
  {
    x: 30,
    unskewContent: true
  }
);

//Unskew element's content matching css selector
var skewObj = new Skew(
  '.skew',
  {
    x: 30,
    unskewContent: '.skew-content'
  }
);

//Don't unskew element's content (default)
var skewObj = new Skew(
  '.skew',
  {
    x: 30,
    unskewContent: false
  }
);

Breakpoints option example

var skewObj = new Skew(
  '.skew',
  {
    x: 30,
    y: 60,
    breakpoints: [
      {
        break: 1024
        x: 60,
        y: 30,
        unskewContent: true,
        debounce: false,
        debounceTime: 30
      },
      {
        break: 768,
        x: 30,
        unskewContent: '.skew-content'
      },
      {
        break: 480,
        y: 60
      }
    ]
  }
);

Methods

Method | Arguments | Description ------------ | ------------- | ------------ skew | | Recalculates skew update | options : object | Update Skew options destroy | | Destroys Skew beforeSkew | listener : function | Add listener to beforeSkew event (see events) afterSkew | listener : function | Add listener to afterSkew event (see events) beforeElementSkew | listener : function | Add listener to beforeElementSkew event (see events) afterElementSkew | listener : function | Add listener to afterElementSkew event (see events)

Events

Events has been added with version 0.7.

Event | Params | Description ------------ | ------------- | ------------ beforeSkew | skewObj, targets | Before start of skewing elements. afterSkew | skewObj, targets | After skewing all elements. beforeElementSkew | skewObj, target | Before skew of every element. afterElementSkew | skewObj, target | After skew of every element.