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

wowjs-shadow

v2.0.1

Published

This Fork it's for using HTMLElements instead of string selectors in ScrollContainer property, which that means that you can pass Elements that are not reachable by selectors such as Elements inside Shadow Dom.

Downloads

8

Readme

Description

This Fork it's for using HTMLElements instead of string selectors in ScrollContainer property, which that means that you can pass Elements that are not reachable by selectors such as Elements inside Shadow Dom.

Reveal CSS animation as you scroll down a page. By default, you can use it to trigger animate.css animations. But you can easily change the settings to your favorite animation library.

Advantages:

  • Smaller than other JavaScript parallax plugins, like Scrollorama (they do fantastic things, but can be too heavy for simple needs)
  • Super simple to install, and works with animate.css, so if you already use it, that will be very fast to setup
  • Fast execution and lightweight code: the browser will like it ;-)
  • You can change the settings - see below

Version

2.0.1

Dependencies

Installation

  • NPM
  npm install wowjs-shadow

Basic usage

In order to hide all elements when they are supposed to be hidden. (Anti Flickering)

  • CSS
.wow {
  visibility: hidden;
}
  • HTML
<section class="wow slideInLeft"></section>
<section class="wow slideInRight"></section>
  • JavaScript
new WOW().init();

Advanced usage

  • HTML
<section
  class="wow slideInLeft"
  data-wow-duration="2s"
  data-wow-delay="5s"
></section>
<section
  class="wow slideInRight"
  data-wow-offset="10"
  data-wow-iteration="10"
></section>
  • JavaScript
var wow = new WOW({
  boxClass: "wow", // animated element css class (default is wow)
  animateClass: "animated", // animation css class (default is animated)
  offset: 0, // distance to the element when triggering the animation (default is 0)
  mobile: true, // trigger animations on mobile devices (default is true)
  live: true, // act on asynchronously loaded content (default is true)
  callback: function(box) {
    // the callback is fired every time an animation is started
    // the argument that is passed in is the DOM node being animated
  },
  scrollContainer: null // optional scroll container HTMLElement, otherwise use window
});
wow.init();

Example with scrollContainer using an ion-content element of ionic4:

const content = document.querySelector(".ion-page > ion-content");
const scrollElement = content.shadowRoot.querySelector("main.inner-scroll");
const wow = new WOW({
  scrollContainer: scrollElement
});
wow.init();

Asynchronous content support

In IE 10+, Chrome 18+ and Firefox 14+, animations will be automatically triggered for any DOM nodes you add after calling wow.init(). If you do not like that, you can disable this by setting live to false.

If you want to support older browsers (e.g. IE9+), as a fallback, you can call the wow.sync() method after you have added new DOM elements to animate (but live should still be set to true). Calling wow.sync() has no side effects.

Development

The library is written in CoffeeScript, please update wow.coffee file.

We use gulp to compile and minify the library:

Install needed libraries

npm install

compile project

gulp

or single run:

npm run build

Enjoy!

Developers

Developed by Matt Delac, delac.io

Developed fork by David Peris