1.0.0 • Published 3 years ago

scoochjs v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

Scooch

Scooch makes slideshows easy. You bring your own content and styling (aside from some functional styles to make Scooch work). It's super lightweight, around 1.5kb gzipped and easy to customise.

Installation

You can either download the repo, grab the JS and CSS and link them in your HTML, or if you prefer, you can install via NPM:

npm install scoochjs --save

Usage

See demo in index.html for a setup guide.

Options

You can pass an optional object to set any of the below items, as the second parameter, when instantiating Scooch.

e.g.

new Scooch(element, { autoplay: false });
KeyDescriptionDefault Value
autoplayMove to the next slide automaticallyfalse
autoplayIntervalHow often (in MS) to change slide, if autoplay is true5000
keyboardControlsEnable keyboard controlstrue
enableFullscreenAllow the slideshow to be made fullscreentrue
scrollToChangeMove to next/previous slides by scrollingtrue
swipeToChangeMove to next/previous slides by swiping on a touch devicetrue

Methods

MethodDescription
next()Go to the next slide
previous()Go to the previous slide
goToSlide(index)Go to specific slide. index should be the array index of the slide to goto.

Keyboard Controls

  • Next Slide: Right arrow, space
  • Previous Slide: Left arrow
  • Enter Fullscreen: F
  • Exit Fullscreen: esc

Roadmap

  • Add lifecycle events (e.g. init, onSlideChange etc.)
  • Make fullscreen only affect slideshow element
1.0.0

3 years ago

0.3.0

3 years ago

0.2.0

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago