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

pico-slider-js

v1.0.0

Published

A lightweight, reusable image slider for Pico.css (or standalone).

Downloads

2

Readme

📸 Pico Slider

A lightweight, reusable image slider for Pico.css — or standalone with no dependencies. Supports multiple sliders per page, autoplay, captions, indicators, and keyboard navigation.


🚀 Installation

npm install pico-slider

Or via CDN:

<!-- Pico.css version -->
<link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css">
<link rel="stylesheet" href="https://unpkg.com/pico-slider/dist/slider.css">
<script src="https://unpkg.com/pico-slider/dist/slider.js"></script>

<!-- Standalone version -->
<link rel="stylesheet" href="https://unpkg.com/pico-slider/dist/slider.standalone.css">
<script src="https://unpkg.com/pico-slider/dist/slider.standalone.js"></script>

🛠 Usage

HTML Structure

<div class="pico-slider" tabindex="0">
  <div class="pico-slides">
    <img src="image1.jpg" alt="Slide 1" data-caption="First caption">
    <img src="image2.jpg" alt="Slide 2" data-caption="Second caption">
    <img src="image3.jpg" alt="Slide 3" data-caption="Third caption">
  </div>
</div>

JavaScript (ESM)

import PicoSlider from "pico-slider";
import "pico-slider/css";

new PicoSlider(document.querySelector(".pico-slider"), {
  autoplay: true,
  interval: 4000,
  keyboard: true,
  captions: true,
  indicators: true
});

Standalone (no Pico.css)

import PicoSlider from "pico-slider/standalone";
import "pico-slider/standalone/css";

new PicoSlider(document.querySelector(".pico-slider"), { autoplay: true });

⚙️ Options

| Option | Type | Default | Description | | -------------- | --------- | ------- | ------------------------------------------ | | autoplay | boolean | false | Automatically cycle through slides. | | interval | number | 3000 | Autoplay interval in ms. | | startIndex | number | 0 | Starting slide index. | | pauseOnHover | boolean | true | Pause autoplay on hover. | | keyboard | boolean | true | Enable arrow key navigation. | | indicators | boolean | true | Show navigation dots. | | captions | boolean | true | Show image captions (from data-caption). |


⌨️ API

const slider = new PicoSlider(container, options);

slider.next();      // Go to next slide
slider.prev();      // Go to previous slide
slider.goTo(2);     // Go to slide by index
slider.destroy();   // Remove slider instance

📂 Project Structure

pico-slider/
├── src/                     # Source files (edit these)
│   ├── slider.js
│   ├── slider.css           # Pico.css-based styles
│   └── slider.standalone.css# Standalone styles
├── dist/                    # Build output (published to npm)
│   ├── slider.js
│   ├── slider.esm.js
│   ├── slider.css
│   ├── slider.standalone.js
│   └── slider.standalone.css
├── demo/                    # Example demo page
│   └── index.html
├── index.d.ts               # TypeScript typings
├── rollup.config.js         # Build config
└── package.json

👩‍💻 Development

Clone the repo and build locally:

git clone https://github.com/instacks/pico-slider.git
cd pico-slider
npm install
npm run dev   # watch mode
npm run build # production build

🌐 Demo

👉 Live Demo on GitHub Pages


📜 License

MIT © Your Name