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

@orcatech/react-neuropsych-stroop

v1.2.9

Published

React components for stroop test

Readme

ORCATECH Stroop Test

Build Status

A Stroop Effect Test implemented as a React component.

Install

The ORCATECH Stroop test is available as an NPM package.

npm install @orcatech/react-neuropsych-stroop

Demo

After installing, open the Stroop Test Demo

Usage

Here's a quick example to get you started:

import React from 'react';
import ReactDOM from 'react-dom';
import Stroop from '@orcatech/react-neuropsych-stroop';

const words = ['green', 'red', 'blue', 'orange'];
const colors = ['009900', '990000', '000099', 'EE7600']
const combos = [
	{ word: 0, color: 0 },
	{ word: 1, color: 1 },
	{ word: 2, color: 2 },
	{ word: 3, color: 3 },
	{ word: 0, color: 1 },
	{ word: 2, color: 3 },
	{ word: 3, color: 2 },
	{ word: 1, color: 0 },
];

class App extends React.Component {
  onComplete = (data) => {
    // handle test completion
    const { errors, successes, begin, finish, timeLimitReached } = data;
  }

  onSuccess = (data) => {
    // handle each success that occurs
  }

  onError = (data) => {
    // handle each error that occurs
  }

  render() {
    return (
      <Stroop
        colors={colors}
        combos={combos}
        onComplete={this.handleComplete}
        onError={this.handleError}
        onSuccess={this.handleSuccess}
        words={words}
      />
    );
  }
}

ReactDOM.render(<App />, document.querySelector('#app'));

Props

| Name | Type | Default | Description | | ----------------- | ------ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | buttonsPerRow | number | 2 | The number of buttons per row | | colors | array | | An array of RGB hex colors values without the #. These should match the items in the words array. ['009900', '990000', '000099', 'EE7600'] | | combos | array | | An array of objects with a shape of color and word that refer to their respective array index. Each combination is used for each task and the correct button press is based on the color value. [{ word: 0, color: 1 }, { word: 1, color: 2 }] | | completionMessage | string | 'Completed! Please press next.' | The message that is shown when the test is completed. | | correctMessage | string | 'Correct!' | The message that is show when a correct button was pressed. | | correctMessageTimeout | number | 750 | Milliseconds for the correct message to be visible. | | incorrectMessage | string | 'Incorrect, please try again' | The message that is show when an incorrect button was pressed. | | onComplete | func | | Callback fired when the test is completed function (completionData: object) => void completionData: an object with the following keys    start: timestamp, stop: timestamp, events: array, timeLimit: number, timeLimitReached: bool | | onError | func | | Callback fired when an incorrect button was pressed function (data) => void data: an object with the following keys    stamp, index, word, color, start, selectedColor | | onSuccess | func | | Callback fired when a correct button was pressed function (data) => void data: an object with the following keys    { stamp: number, index: number, word: string, color: string, start: timestamp, selectedColor: string } | | textSize | string | '2rem' | The font-size of the text. | | timeLimit | number | 45000 | Milliseconds for the time limit of the test. Use 0 to disable the time limit. | | words | array | | An array of keywords for each color. These should match the items in the colors array. ['green', 'red', 'blue', 'orange'] |

Testing

Cross-browser testing supported by: