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

@n2ptune/smooth-page

v1.0.4

Published

A lightweight smooth full-page scroll JavaScript library

Downloads

43

Readme

Smooth Page

A lightweight, customizable, and smooth full-page scroll JavaScript/TypeScript library with advanced animation presets. Built with TypeScript for better developer experience and type safety.

Demo

Check out the live demo: https://n2ptune.github.io/smooth-page/

Installation

npm

npm install @n2ptune/smooth-page

CDN

<!-- Stylesheet -->
<link rel="stylesheet" href="https://unpkg.com/@n2ptune/smooth-page/dist/smooth-page.css">

<!-- Script -->
<script src="https://unpkg.com/@n2ptune/smooth-page/dist/smooth-page.umd.js"></script>

Usage

npm (Bundlers)

If you are using a bundler like Vite, Webpack, or Rollup:

import SmoothPage from '@n2ptune/smooth-page';
import '@n2ptune/smooth-page/css';

const sp = new SmoothPage('#smooth-page', {
  animation: 'zoom',
  scrollingSpeed: 700
});

CDN (Browser)

If you are including the library directly via a <script> tag:

<link rel="stylesheet" href="https://unpkg.com/@n2ptune/smooth-page/dist/smooth-page.css">

<div id="smooth-page">
  <section class="sp-section"><h1>Section 1</h1></section>
  <section class="sp-section">
    <div class="sp-slides">
      <div class="sp-slide"><h1>Slide 1</h1></div>
      <div class="sp-slide"><h1>Slide 2</h1></div>
    </div>
  </section>
</div>

<script src="https://unpkg.com/@n2ptune/smooth-page/dist/smooth-page.umd.js"></script>
<script>
  document.addEventListener('DOMContentLoaded', () => {
    const sp = new SmoothPage('#smooth-page', {
      animation: 'slide-up',
      navigation: true
    });
  });
</script>

Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | scrollingSpeed | number | 700 | Speed of the transition animation in milliseconds. | | easing | string | 'cubic-bezier(0.645, 0.045, 0.355, 1)' | CSS transition timing function. | | animation | string | 'default' | Animation preset: default, zoom, slide-up, parallax. | | navigation | boolean | true | Whether to show the side dot navigation. | | arrows | boolean | true | Whether to show side arrows for horizontal slides. | | onLeave | function | null | Callback fired before leaving a section. (index: number, nextIndex: number) => void | | afterLoad | function | null | Callback fired after a section is loaded. (index: number) => void | | onSlideLeave | function | null | Callback fired before leaving a horizontal slide. (sectionIdx: number, slideIdx: number, nextSlideIdx: number) => void | | afterSlideLoad | function | null | Callback fired after a horizontal slide is loaded. (sectionIdx: number, slideIdx: number) => void |

Methods

| Method | Description | | --- | --- | | moveTo(index) | Scrolls the page to the specified section index. | | next() | Scrolls to the next section. | | prev() | Scrolls to the previous section. | | moveToSlide(sectionIndex, slideIndex) | Scrolls to a specific slide within a section. | | moveSlideRight(sectionIndex) | Scrolls to the next slide in the specified section. | | moveSlideLeft(sectionIndex) | Scrolls to the previous slide in the specified section. | | setOptions(options) | Updates the library options dynamically. |

Customization

You can easily customize the appearance of navigation dots and arrows using CSS variables. Override them in your global CSS:

:root {
  --sp-nav-color: rgba(0, 0, 0, 0.2);
  --sp-nav-active-color: #ff0000;
  --sp-nav-size: 12px;
  --sp-arrow-bg: rgba(0, 0, 0, 0.5);
  --sp-arrow-size: 60px;
}

CSS Variables List

| Variable | Default | Description | | --- | --- | --- | | --sp-nav-color | rgba(255, 255, 255, 0.3) | Navigation dot color | | --sp-nav-active-color | #fff | Active navigation dot color | | --sp-nav-size | 10px | Navigation dot size | | --sp-nav-active-scale | 1.8 | Scale of the active dot | | --sp-arrow-bg | rgba(255, 255, 255, 0.15) | Control arrow background | | --sp-arrow-hover-bg | rgba(255, 255, 255, 0.3) | Control arrow hover background | | --sp-arrow-size | 50px | Control arrow button size | | --sp-arrow-color | #fff | Control arrow icon color |

License

MIT License