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

animation-director

v0.1.1

Published

Stencil Component Starter

Downloads

12

Readme

animation-director

Animation Director is an element that gives you attribute hooks in your css to tell when things happen on screen

Polyfills

The only real thing you'd need for animation director is the IntersectionObserver polyfill

<script src="https://polyfill.io/v2/polyfill.min.js?features=IntersectionObserver"></script>

Attributes: Added to markup by you

data-rootmargin

data-rootmargin controls the rootmargin of the intersection observer for the animation-director

Example

<animation-director data-rootmargin="-50%"></animation-director>

data-threshold

data-threshold controls the threshold of the intersection observer for the animation-director

Example

<animation-director data-threshold="-50%"></animation-director>

data-ids

data-ids takes a comma separated list of ids of elements to keep track of, when any of them come into the viewport, they will update the data-scene with whichever index they are in data-ids.

data-thresholds

data-thresholds is like data-threshold above, but for the elements refered to in data-ids

Example

<animation-director ids="bob,craw" data-thresholds="-50%"></animation-director>

data-rootMargins

data-rootmargins is like data-rootmargin above, but for the elements refered to in data-ids

Example

<animation-director ids="bob,craw" data-rootmargins="-50%"></animation-director>

Attributes: css hooks used for styling

data-on-screen

data-on-screen will be added and removed when element is on or off screen.

Example

<animation-director data-on-screen="true"></animation-director>

This means that this animation director is currently on screen.

data-scene

data-scene will tell you the index of the ids that are on screen currently

Example

<animation-director data-ids="bob,craw,fish" data-scene="2">

This means that an element with the id of fish, is currently on screen.

data-passed

When data-passed is present that means that the animation director has passed through the viewport at somempoint

Example

<animation-director data-passed=""></animation-director>

data-passed-{i}

When data-passed-{i} is present that means that the element with that index in the data-ids, has passed through the viewport

Example

<animation-director data-ids="bob,craw,fish" data-passed-1 data-passed-2></animation-director>

This means that the element with the id of bob and craw has passed through the viewport at some point.


Built with StencilJS