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

power-slides

v1.6.0

Published

Create powerful slideshows for talks and presentations. Each "slide" is a JS function that can do *anything*.

Downloads

95

Readme

power-slides

Create powerful slideshows for talks and presentations. Each "slide" is a JS function that can do anything.

If you only want a couple features while keeping the full power of JS, this might help you. This will:

  • NEW "Presenter Mode": View slide notes on your phone + remote control
  • Let you use arrow keys for going forward or back
  • Let you jump to any slide by number in the url hash
  • Keep the url hash synced with the slide you're on
  • Run the slide's function each time you navigate to it

Example

var PS = require('power-slides')

// Starts the show: left/right arrows to go forward/back
PS.start(document.body, [
  // A "slide" can simply be text
  'Introducing power-slides',

  // When an array, the first item is the "slide" and the rest are notes
  [ 'I am a Title',
    'This is note only viewable in presenter mode',
    '...and so is this' ],

  // power-slides has a helper for images
  [ PS.image('/example/fist-bump.gif'),
    'By default, the image is full-screen',
    'It does this by using the "cover" background-size method' ],

  // there's also a helper for video
  [
    PS.video('/example/spin.mp4', {
      loop: false,
      muted: false,
      controls: false,
      size: 'contain' // or 'cover'
    }),
    'By default the video will not loop, show controls, nor be muted',
    '...but that can be changed easily'
  ],

  // layered title example
  PS.layeredTitle(
    'Layered Title!',
    PS.image('/example/multipass.gif'),
    { brightness: 0.4 }
  ),

  // if you want to get fancy, pass in a function
  function (slideContainer) {
    // your function will receive the slide container as an argument
    // we'll clear it out and add a "typewriter" effect
    slideContainer.innerHTML = ''

    var el = document.createElement('h1')
    el.style.fontFamily = 'monospace'
    slideContainer.appendChild(el)

    var letters = ('Custom effects!').split('')

    var interval = setInterval(function () {
      var letter = letters.shift()
      if (!letter) return clearInterval(interval)

      el.innerHTML += letter
    }, 250)
  }
])

Edit example/index.js and run npm run example to try it out in your browser.

API

PS.start(el, slideFns)

This will start the slideshow with the specified element (usually document.body) and array of slide functions.

Each item in the array will be text or a "slide helper" like PS.image or PS.video (explained below), a DOM element, or a function that receives the container element as an argument.

var slideshow = PS.start(document.body, [
  // basic large text
  'power-slides',

  // or your own function
  function (slide) {
    var el = document.createElement('h1')
    el.innerHTML = 'Custom Slide!'

    slide.innerHTML = ''
    slide.appendChild(el)
  }
])

PS.image(url[, backgroundSize])

Standard "big image". By default backgroundSize is "cover". Depending on the image you might want to use "contain". For more info see background-size on MDN.

PS.video(url[, videoOptions])

Standard "big movie". Default options are {loop: false, muted: false, controls: false, size: 'contain'}

PS.layeredTitle(text, backgroundSlideFn[, options])

Creates a slide with large text layered on top of another slide (backgroundSlideFn). The backgroundSlideFn should be another slide helper like PS.image or PS.video, or a custom slide function.

The options object currently only supports brightness (default 0.6) which controls the brightness of the background slide.

PS.layeredTitle(
  'Title Over Image',
  PS.image('/path/to/background.jpg'),
  { brightness: 0.5 }
)

License

MIT