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

apslider-js

v1.0.2

Published

Carousel / Slider - built using vanilla javascript. Library is framework independent and can be used with any framework/ platform

Downloads

5

Readme

APSlider

Carousel / Slider - built using vanilla javascript. Library is framework independent and can be used with any framework/ platform.

Features & Benefits

  • Vanilla Javascript based carousel/ slider.
  • Uses Javascript ES6 version based Web Component structure.
  • Superfast performance, no third-party framework needed.
  • Framework independent, use with any framework (react, angular, etc...).
  • Very easy to integrate in any framework.
  • Fully responsive. Scales with its container.
  • Separate settings per breakpoint.
  • Uses CSS3. Fully functional.
  • Swipe enabled. Or disabled, if you prefer.
  • Desktop mouse dragging.
  • Infinite looping.
  • Fully accessible with arrow key navigation.
  • Add, remove, filter & unfilter slides.
  • Autoplay, dots, arrows, callbacks, etc...

Demos & Documentation

Documentation is available @ https://apslider.devamish.com/

Settings

accessibility

type: boolean default: true

  • Enables tabbing and arrow key navigation

adaptiveHeight

type: boolean default: false

  • Enables adaptive height for single slide horizontal carousels

autoplay

type: boolean default: false

  • Enables Autoplay

autoplaySpeed

type: int(ms) default: 3000

  • Autoplay Speed in milliseconds

arrows

type: boolean default: true

  • Prev/Next Arrows

asNavFor

type: string default: null

  • Set the slider to be the navigation of other slider (Class or ID Name)

appendArrows

type: string default: document.querySelector(element)

  • Change where the navigation arrows are attached (Selector, htmlString, Array, Element)

appendDots

type: string default: document.querySelector(element)

  • Change where the navigation dots are attached (Selector, htmlString, Array, Element)

prevArrow

type: string (html selector) | object (DOM node) default: <button class="apslider-prev" aria-label="Previous" type="button">Previous</button>

  • Allows you to select a node or customize the HTML for the "Previous" arrow

nextArrow

type: string (html selector) | object (DOM node) default: <button class="apslider-next" aria-label="Next" type="button">Next</button>

  • Allows you to select a node or customize the HTML for the "Next" arrow

centerMode

type: boolean default: false

  • Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts

centerPadding

type: string default: '50px'

  • Side padding when in center mode (px or %)

cssEase

type: string default: 'ease'

  • CSS3 Animation Easing

customPaging

type: function default: n/a

  • Custom paging templates. See source for use example

dots

type: boolean default: false

  • Show dot indicators

dotsClass

type: string default: 'apslider-dots'

  • Class for slide indicator dots container

draggable

type: boolean default: true

  • Enable mouse dragging

fade

type: boolean default: false

  • Enable fade

focusOnSelect

type: boolean default: false

  • Enable focus on selected element (click)

easing

type: string default: 'linear'

  • Add easing for jQuery animate. Use with easing libraries or default easing methods

edgeFriction

type: integer default: 0.15

  • Resistance when swiping edges of non-infinite carousels

infinite

type: boolean default: true

  • Infinite loop sliding

initialSlide

type: integer default: 0

  • Slide to start on

lazyLoad

type: string default: 'ondemand'

  • Set lazy loading technique. Accepts 'ondemand' or 'progressive'

mobileFirst

type: boolean default: false

  • Responsive settings use mobile first calculation

pauseOnFocus

type: boolean default: true

  • Pause Autoplay On Focus

pauseOnHover

type: boolean default: true

  • Pause Autoplay On Hover

pauseOnDotsHover

type: boolean default: false

  • Pause Autoplay when a dot is hovered

respondTo

type: string default: 'window'

  • Width that responsive object responds to. Can be 'window', 'slider' or 'min' (the smaller of the two)

responsive

type: object default: none

  • Object containing breakpoints and settings objects (see demo). Enables settings sets at given screen width. Set settings to "destroyed" instead of an object to disable apslider at a given breakpoint

rows

type: int default: 1

  • Setting this to more than 1 initializes grid mode. Use slidesPerRow to set how many slides should be in each row

slide

type: element default: ''

  • Element query to use as slide

slidesPerRow

type: int default: 1

  • With grid mode intialized via the rows option, this sets how many slides are in each grid row

slidesToShow

type: int default: 1

  • # of slides to show

slidesToScroll

type: int default: 1

  • # of slides to scroll

speed

type: int(ms) default: 300

  • Slide/Fade animation speed

swipe

type: boolean default: true

  • Enable swiping

swipeToSlide

type: boolean default: false

  • Allow users to drag or swipe directly to a slide irrespective of slidesToScroll

touchMove

type: boolean default: true

  • Enable slide motion with touch

touchThreshold

type: int default: 5

  • To advance slides, the user must swipe a length of (1/touchThreshold) * the width of the slider

variableWidth

type: boolean default: false

  • Variable width slides

vertical

type: boolean default: false

  • Vertical slide mode

verticalSwiping

type: boolean default: false

  • Vertical swipe mode

rtl

type: boolean default: false

  • Change the slider's direction to become right-to-left

waitForAnimate

type: boolean default: true

  • Ignores requests to advance the slide while animating

zIndex

type: number default: 1000

  • Set the zIndex values for slides, useful for IE9 and lower