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

cg-aos

v0.1.1

Published

Modern, zero-dep animate-on-scroll (AOS reimagined for 2025+).

Downloads

4

Readme

cg-aos

cg-aos is a modern, zero-dependency Animate On Scroll library.
It’s a fresh re-imagining of AOS, rebuilt for 2025+: smaller, faster, and free of legacy JavaScript.

  • Lightweight: no dependencies, ~2 KB min+gzip
  • 🖼 Simple API: just add data-cg attributes
  • 🕹 Customizable: duration, delay, easing, stagger
  • 🧑‍🦽 Accessible: respects prefers-reduced-motion
  • 🔄 Dynamic: auto-observes elements added later
  • 📦 Modern: ships as ES Module (no Babel / legacy code)

🚀 Installation

npm install cg-aos

(Optional: if you prefer Yarn or pnpm, you can install with yarn add cg-aos or pnpm add cg-aos after installing those package managers.)


📖 Quick Start

Include the CSS (optional baseline styles) and initialize the script:

<link rel="stylesheet" href="/node_modules/cg-aos/cg-aos.css">

<script type="module">
  import { cgAOS } from 'cg-aos';

  cgAOS.init({
    once: true,                    // animate only once
    rootMargin: '0px 0px -10% 0px' // viewport margin
  });
</script>

<section data-cg="fade-up" data-cg-duration="600" data-cg-delay="120">
  Hello CODEGENIE 🚀
</section>

🎨 Data Attributes

| Attribute | Type | Default | Description | |---------------------|--------- |--------------------------|------------------------------------------------| | data-cg | string | fade | Animation type (fade, fade-up, fade-down, fade-left, fade-right, zoom-in, zoom-out) | | data-cg-duration | number | 500 (ms) | Animation duration in milliseconds | | data-cg-delay | number | 0 | Delay before animation starts (ms) | | data-cg-easing | string | cubic-bezier(.2,.7,.2,1) | CSS easing function | | data-cg-once | boolean | true | Animate only once (true) or repeat on scroll (false) | | data-cg-stagger | number | 0 | Stagger children animations (ms per child) |


⚙️ JavaScript API

import { cgAOS } from 'cg-aos';

const aos = cgAOS.init({
  selector: '[data-cg]', // CSS selector
  once: true,            // animate only once
  autoObserve: true,     // watch new elements added to DOM
  reducedMotion: 'skip'  // 'skip' | 'instant' | 'none'
});

// Later you can control it programmatically:
aos.observe(document.querySelector('#new-el'));
aos.unobserve(document.querySelector('#old-el'));
aos.destroy();

🧑‍🦽 Accessibility

  • Respects prefers-reduced-motion automatically.
  • Options:
    • reducedMotion: 'skip' → disable animations
    • reducedMotion: 'instant' → show instantly (no animation)
    • reducedMotion: 'none' → always animate

🔧 Supported Animations

  • fade
  • fade-up
  • fade-down
  • fade-left
  • fade-right
  • zoom-in
  • zoom-out

➡️ You can extend this with your own CSS and data-cg values.


🛠 Development

Clone and run locally:

git clone https://github.com/codegenie-be/cg-aos.git
cd cg-aos
npm install

Run a local test:

npm link
# in your test project
npm link cg-aos

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to open an issue or a pull request.


📦 Publishing (maintainers only)

To release a new version:

npm version patch    # or minor / major
npm publish

📜 License

MIT © 2025 CODEGENIE


💡 Why cg-aos?

AOS (2017) ships with legacy JavaScript and hasn’t been updated in years.
cg-aos is a 2025 rebuild:

  • No jQuery, no Babel helpers.
  • ESNext, lightweight, future-proof.
  • Declarative attributes, clean modern API.