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 🙏

© 2024 – Pkg Stats / Ryan Hefner

nico-swiper

v1.1.2

Published

A swiper for web mobile

Downloads

7

Readme

NSwiper

NSwiper is a swiper plugin for mobile web (only for mobile)

Features

  • Small
  • Simple
  • No other dependencies

Installation

$ npm install --save nico-swiper

Getting started

<div id="swiper1" class="nswiper-wrapper">
  <div class="nswiper-container">
    <div class="nswiper-slide">
      <div class="slide">
        <img src="https://wpimg.wallstcn.com/2ab21ec8-7882-4db5-b764-c6735ddc1dd1.png" alt="slide">
      </div>
    </div>
    <div class="nswiper-slide">
      <div class="slide">
        <img src="https://wpimg.wallstcn.com/d1f71496-5391-412d-8386-5fcbaba276f6.jpg" alt="slide">
      </div>
    </div>
    <div class="nswiper-slide">
      <div class="slide">
        <img src="https://wpimg.wallstcn.com/6342464e-71c1-497e-bebc-202910aa992c.jpg" alt="slide">
      </div>
    </div>
    <div class="nswiper-slide">
      <div class="slide">
        <img src="https://wpimg.wallstcn.com/5af3a726-4d23-4cde-8364-4f1809b61f89.jpg" alt="slide">
      </div>
    </div>
  </div>
</div>
import NSwiper from 'nico-swiper'
// or <script src="NSwiper.min.js"></script>
const swiper = new NSwiper('#swiper', {
  gutter: 0, // slide gap
  slideWidth: 0, // custom slide width, if not set will be parent width
  defaultIndex: 0, // initial slide to show
  defaultOffset: 0, // initial offset
  containerClass: '.nswiper-container', // custom container class
  slideClass: '.nswiper-slide', // custom container slide class
  duration: 300, // slide transition duration
  autoplay: 0 // must be a number, if set will swipe slide auto
  onSlideChange: function(index) {} // slide changed callback, index is the current slide index
})

// next slide
swiper.goNext()
// prev slide
swiper.goPrev()

// destroy
swiper.destroy()

FAQ

  • how to add indicators ?

    good question, we can use onSlideChange callback implement our custom indicators

  • custom prev next ?

    use instance method goNext and goPrev, like swiper.goNext()

  • pc support

    maybe

  • examples ?

    check it on http://chef-salad.com/nico-swiper/

    and pictures used in demo from a singer called 9m88