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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jspsych-contrib/plugin-slide-to-continue

v1.0.0

Published

The plugin-slider is a jsPsych plugin that creates an interactive slider interface similar to the 'slide to unlock' functionality found on mobile devices. Users must drag a slider handle to complete the trial, making it useful for consent screens, engagem

Downloads

15

Readme

plugin-slider

Overview

The plugin-slide-to-continue is a jsPsych plugin that creates an interactive slider interface similar to the "slide to unlock" functionality found on mobile devices. Users must drag a slider handle to complete the trial, making it useful for consent screens, engagement checks, or transition screens in psychological experiments.

Features

  • Customizable appearance: Control color, shape, size, and orientation
  • Flexible direction: Support for left-to-right or right-to-left sliding
  • Smooth animations: Optional smooth transitions and visual feedback
  • Touch-friendly: Works on both desktop and mobile devices
  • Progress tracking: Records completion status, response time, and final position

Installation

Using npm

npm install plugin-slide-to-continue

Using a CDN

<script src="https://unpkg.com/plugin-slide-to-continue@latest/dist/index.browser.min.js"></script>

Compatibility

plugin-slide-to-continue requires jsPsych v8.0.0 or later.

Parameters

In addition to the parameters available in all plugins, this plugin accepts the following parameters. Parameters with a default value of undefined must be specified. Other parameters can be left unspecified if the default value is acceptable.

| Parameter | Type | Default Value | Description | | -------------- | ------- | ------------------ | -------------------------------------------------------------- | | color | string | "purple" | The color of the slider track and handle (hex, rgb, or named) | | direction | string | "left-to-right" | The sliding direction ("left-to-right" or "right-to-left") | | object_sliding | string | "round" | The shape of the slider handle ("round" or "square") | | length | number | 300 | The length of the slider in pixels | | orientation | string | "horizontal" | The slider orientation ("horizontal" or "vertical") | | width | number | 60 | The width/height of the slider track in pixels | | animation | string | "smooth" | Animation style ("smooth" or "ticks") | | prompt | string | null | HTML content displayed above the slider | | slider_text | string | "Slide to continue" | Text displayed on the slider | | duration | number | null | Maximum trial duration in milliseconds |

Data Generated

In addition to the default data collected by all plugins, this plugin collects the following data for each trial.

| Name | Type | Value | | ---------------- | ------- | ---------------------------------------------------------- | | rt | number | The response time in milliseconds to complete the slide | | response | boolean | Whether the slider was successfully completed | | final_position | number | The final position of the slider (0-100) |

Examples

Basic Usage

var trial = {
  type: jsPsychPluginSlider,
  prompt: '<h2>Welcome to the Experiment</h2>',
  slider_text: 'Slide to continue'
};

Vertical Red Slider

var trial = {
  type: jsPsychPluginSlider,
  color: 'red',
  orientation: 'vertical',
  length: 200,
  width: 80,
  object_sliding: 'square',
  slider_text: 'Slide up'
};

Right-to-Left Slider

var trial = {
  type: jsPsychPluginSlider,
  direction: 'right-to-left',
  color: '#2196F3',
  animation: 'ticks',
  prompt: '<p>Slide from right to left to proceed</p>'
};

Timed Trial

var trial = {
  type: jsPsychPluginSlider,
  duration: 10000, // 10 seconds maximum
  prompt: '<p>Quick! Slide to continue before time runs out!</p>',
  color: 'orange'
};

Documentation

See documentation for detailed usage information.

Author / Citation

Vishnu Lakshman