Create behavioral experiments in a browser using JavaScript
Go to file
2022-09-22 11:57:33 -04:00
.changeset chore(release): version packages 2022-07-20 13:24:31 +00:00
.github Make the release workflow update all unpkg links 2022-02-08 18:28:15 +01:00
.husky Configure husky to run prettier via lint-staged 2021-08-13 22:04:28 +02:00
docs bugfixes for doc demos 2022-09-22 11:57:33 -04:00
examples Revert "added readme for every package and extension" 2022-09-20 09:43:49 -04:00
packages Revert "added readme for every package and extension" 2022-09-20 09:43:49 -04:00
.gitignore Setup turborepo 2021-12-11 23:28:07 +01:00
.npmrc Prepare @jspsych/config for external use 2021-08-25 21:57:28 +02:00
code-of-conduct.md fix link to website contributing page 2021-09-27 16:47:55 -07:00
contributors.md added contributor nikbpetrov 2021-06-10 14:50:46 -07:00
gulpfile.js change gulp task name updatePluginVersion -> updatePluginVersions #2609 2022-05-06 12:15:28 -07:00
license.txt update license yr 2022-05-05 15:45:32 -04:00
mkdocs.yml add links to new plugins 2022-07-13 14:00:06 -04:00
package-lock.json chore(release): version packages 2022-07-20 13:24:31 +00:00
package.json add docs commands to package.json 2022-05-19 13:42:26 -04:00
poetry.lock add mike as dev dependency 2022-05-19 10:06:03 -04:00
pyproject.toml remove version, description, authors from config 2022-05-19 13:37:49 -04:00
README.md fix one more broken readme link 2021-10-01 18:49:07 -04:00
turbo.json Move Turbo config to turbo.json 2022-03-11 19:41:58 +01:00

jspsych logo

jsPsych is a JavaScript framework for creating behavioral experiments that run in a web browser.

Experiments in jsPsych are created using plugins. Each plugin defines different kinds of events, like showing an image on the screen, and collects different kinds of data, like recording which key was pressed at which time. By assembling different plugins together into a timeline, it is possible to create a wide range of online experiments.

What can I do with jsPsych?

jsPsych comes with a number of plugins that you can use create tasks and collect data. Some plugins do general things, like present a stimulus (text, image, audio, video) and record a key press or button response along with a response time. Other plugins do more specific things, like show a set of instructions pages, run a drag-and-drop image sorting task, or calibrate the WebGazer eye-tracking extension. See the list of all plugins to see what each plugin can do.

Often people can create their experiment by combining these plugins together. But if that's not possible for your experiment, you can also modify a plugin file or create your own plugin. This gives you the flexibility to do exactly what you want, while still taking advantage of jsPsych's general experiment-building framework. The plugin template is extremely flexible. If a task is possible to do in a web browser, you can almost certainly implement it as a plugin.

Getting started

jsPsych can be loaded into a project in a variety of ways, including via CDNs and through NPM. You can learn more about setting up a project by following the hello world tutorial on the jsPsych website.

Once you've got a project set up, the reaction time task tutorial is a great next step, since it covers many core topics and features.

There are also a number of video tutorials available on the website.

Examples

Several example experiments and plugin demonstrations are available in the /examples folder. After you've downloaded the latest release, double-click on an example HTML file to run it in your web browser, and open it with a programming-friendly text editor to see how it works.

Documentation

Documentation is available at https://www.jspsych.org.

Getting help

For questions about using the library, please use the GitHub discussions forum. You can also browse through the history of Q&A on the forum to find related questions.

Contributing

We ❤️ contributions! See the contributing to jsPsych documentation page for more information about how you can help.

Citation

If you use this library in academic work, please cite the paper that describes jsPsych:

de Leeuw, J.R. (2015). jsPsych: A JavaScript library for creating behavioral experiments in a Web browser. Behavior Research Methods, 47(1), 1-12. doi:10.3758/s13428-014-0458-y

Contributors

jsPsych is open source project with numerous contributors. The project is currently managed by the core team of Josh de Leeuw (@jodeleeuw), Becky Gilbert (@becky-gilbert), and Björn Luchterhandt (@bjoluc).

jsPsych was created by Josh de Leeuw.

We're also grateful for the generous support from a Mozilla Open Source Support award, which funded development of the library from 2020-2021.