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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ivan-slider

v1.1.1

Published

Lightweight slider without dependencies

Downloads

15

Readme

ivanSlider - Lightweight slider without dependencies

ivanSlider is a 3kb (gzipped) carousel with no dependencies and no styling.

Installation

npm i -S ivan-slider

Some markup.

<div class="ivanSlider">
  <div>Hi, I'm slide 1</div>
  <div>Hi, I'm slide 2</div>
  <div>Hi, I'm slide 3</div>
  <div>Hi, I'm slide 4</div>
</div>

If you are using a module bundler like Webpack.

import IvanSlider from 'ivanSlider';

new IvanSlider();

Or manually inject the minified script into your website.

<script src="ivanSlider.build.js"></script>

<script>
  new IvanSlider();
</script>

Options

You can pass some options to the constructor.

new ivanSlider({
  selector: '.ivanSlider',
  slides: 1,
  current: 0,
  loop: false,
  vertical: false,
  threshold: 30,
  duration: 300,
  function: 'ease-out',
  onInit: () => {},
  onChange: () => {},
});

selector (string or DOM element)
The selector to use as a carousel. Slider will use all immediate children of this selector as a slider items. It can be a query string or DOM element.

vertical (boolean)
For vertical scrolling

duration (number)
Slide transition duration in milliseconds

function (string)
It is like a CSS transition-timing-function

slides (number or object)
The number of slides to be shown. It accepts a number or an object for complex responsive layouts.

slides: {
  800: 2, // 2 items for viewport wider than 800px
  1240: 3 // 3 items for viewport wider than 1240px
}

current (number)
Index (zero-based) of the starting slide

threshold (number)
Touch and mouse dragging threshold (in px)

loop (boolean)
Loop the slides around

onInit (function)
Runs immediately after initialization

onChange (function)
Runs after slide change

Methods

prev(slidesCount = 1)
Go to previous item

next(slidesCount = 1)
Go to next item