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

@maxitdev/max-slider

v1.0.0

Published

A slick, animated carousel with drag, keyboard, and autoplay support

Readme

Max Slider

A slick, animated carousel built with vanilla HTML, CSS, and JavaScript. No dependencies.

Install

npm install max-slider

Usage

1. Import the styles

<link rel="stylesheet" href="node_modules/max-slider/styles.css" />

Or in a bundler (Webpack, Vite, etc.):

import "max-slider/styles.css";

2. Add the HTML structure

Your slider markup must follow this structure. The root element can have any id you pass to the constructor:

<section class="slider" id="my-slider" data-mode="dark" aria-roledescription="carousel">
  <div class="slider__chrome" aria-hidden="true"></div>
  <div class="slider__viewport" tabindex="0">
    <div class="track" data-track>
      <article class="slide" data-slide data-accent="#7C3AED">
        <div class="slide__card">
          <div class="slide__shine" aria-hidden="true"></div>
          <!-- Your slide content -->
        </div>
      </article>
      <!-- More slides... -->
    </div>
  </div>
  <button class="nav nav--prev" type="button" data-prev aria-label="Previous slide"><span>‹</span></button>
  <button class="nav nav--next" type="button" data-next aria-label="Next slide"><span>›</span></button>
  <div class="hud">
    <div class="dots" data-dots aria-label="Slide navigation"></div>
    <div class="counter">
      <span data-count-current>1</span><span class="counter__sep">/</span><span data-count-total>5</span>
    </div>
  </div>
</section>

Light / Dark mode

Set the mode using a data attribute on the slider root:

  • data-mode="dark" (default look; great on dark pages)
  • data-mode="light" (optimized for white / light pages)

You can switch modes at runtime by changing the attribute:

const el = document.getElementById("my-slider");
el.dataset.mode = "light"; // or "dark"

3. Initialize with JavaScript

import MaxSlider from "max-slider";

const root = document.getElementById("my-slider");
const slider = new MaxSlider(root);
slider.init();

Auto-init

If your root element has id="max-slider", the slider will auto-initialize when the script loads. Otherwise, create and init it manually as shown above.

Customization

Override CSS variables on .slider (or a parent) to adjust the look:

.my-slider {
  --max-slider-accent: #e11d48;
  --max-slider-max-width: 900px;
  --max-slider-radius: 16px;
  --max-slider-slide-gap: 20px;
}

Available variables: --max-slider-accent, --max-slider-text, --max-slider-muted, --max-slider-radius, --max-slider-slide-gap, --max-slider-max-width, --max-slider-ease-out, --max-slider-ease-snap, --max-slider-shadow.

The slider is centered by default (margin: 0 auto). To align left or right, override the parent container or use margin-left: 0 / margin-right: 0 on .slider.

Features

  • Drag / swipe support
  • Keyboard navigation (← → Home End)
  • Autoplay (pauses on hover/focus)
  • Respects prefers-reduced-motion
  • Accessible (ARIA, focus management)

License

MIT