PSlides: An HTML-first JavaScript library for browser-based psychological experiments and surveys

Read the full article See related articles

Discuss this preprint

Start a discussion What are Sciety discussions?

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

We present PSlides, an open-source, dependency-free JavaScript library that enables researchers to create fully interactive psychological experiments and surveys using only HTML, CSS, and mini-mal JavaScript. By extending standard HTML with lightweight custom elements (e.g., , , , etc.), PSlides eliminates the need for complex frameworks while preserving full control over the document object model. Core features include: slide-based sequencing with configurable navigation keys, auto-advance timers (maxms), and millisecond-level timing via setTimeout; Automatic data logging for any element with a name attribute, with one-click export to JSON or CSV via or ; feedback-rich upload/download using for real-time status (pending, success, error); dynamic content insertion (jsfill, idfill) and flexible trial ordering (shuffle or pseudoshuffle for a given tolerance); multi-session workflow via subject and session codes as well as agendas which allows navi-gation through multiple URLs while preserving participant information, making previous experiments reusable; additional backend logic for data upload and checks are implemented in PHP. Designed for accessibility to novice programmers, PSlides prioritizes readability, reusability, and extensibility: custom JavaScript can be inserted anywhere without interfering with library logic. Example paradigms (Number comparison task, surveys) are provided in the repository. Version 0.2 is released under the MIT license at https://github.com/RomanJJa/pslides. Future releases will add adaptive logic, WebGazer integration, and multilingual UI. PSlides lowers barriers to online data collection, enabling rapid prototyping, classroom use, and large-scale deployment in psychological science.

Article activity feed