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

toobored

v0.1.43

Published

A simple customizable keyboard input for ReactJS

Readme

##TooBored Keyboard - (/to͞o/ bôrd/) A simple customizable keyboard input for ReactJS

Update: brand new actions API. More customizable than ever.

##Props

  1. value String - This is the string that the keyboard is to manipulate. required
  2. visible Boolean - default is set to false required
  3. layout Array - this is an array of objects. if you dont specify them the default QWERTY layout will be displayed optional
  4. actions Array - this lets you override the default action buttons. with your own using an array.
  5. handleLayoutToggle Function - required only when visible
  6. handleKeyboardVisiblity Function - required only when visible
  7. handleSubmit Function - required only when visible
  8. handleChange Function - required only when visible
  9. handleClear Function - required only when visible
  10. theme Object - optional

layout prop example

[
        {
          name: "default",
          keys: [
            // row 1
            ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p"],
            // row 2
            ["a", "s", "d", "f", "g", "h", "j", "k", "l"],
            // row 3
            ["z", "x", "c", "v", "b", "n", "m"]
          ]
        },
        {
          name: "caps",
          keys: [
            // row 1
            ["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P"],
            // ROW 2
            ["A", "S", "D", "F", "G", "H", "J", "K", "L"],
            // ROW 3
            ["Z", "X", "C", "V", "B", "N", "M"]
          ]
        }...
]

actions prop example

[
  {
    type: "toggleKeyboard",
    text: "Hide"
  },
  {
    type: "spaceKey",
    text: "Space"
  },
  {
    type: "deleteKey",
    text: "<="
  },
  {
    type: "submitKey",
    text: "Send"
  }
]

All actions available types

  1. toggleKeyboard - this button type is wired to use your handleKeyboardVisiblity function passed down as a prop.
  2. toggleLayout - this button type is wired to use your handleLayoutToggle function passed down as a prop.
  3. spaceKey - this button type acts just like the regular keys keys and simply adds a space to your input.
  4. deleteKey - this button type is wired to use your handleSubmit function passed down as a prop.
  5. submitKey - this button type is wired to use your handleSubmit function passed down as a prop.
  6. clearKey- this button type is wired to use your handleClear function passed down as a prop.

theme prop example

{
  keyboardBackground: 'orange',
  keyBackground: 'blue',
  keyBackgroundHover: 'red',
  keyColor: 'papayawhip',
  keyColorHover: 'pink'
}

Example

import React, { Component } from "react";
import TooBored from "toobored";

export default class TooBoredExample extends Component {
  constructor() {
    super();
    this.state = {
      value: ""
    };
  }
  handleKeyboardSubmit = () => {
    alert(`Submiting: ${this.state.value}`);
  };
  handleClearValue = () => {
    this.setState({
      value: ""
    });
  };
  handleChangeValue = value => {
    this.setState({
      value
    });
  };
  toggleKeyboardVisibility = () => {
    this.setState({
      toggleKeyboardVisibility: !this.state.toggleKeyboardVisibility
    });
  };
  showKeyboard = () => {
    this.setState({
      toggleKeyboardVisibility: true
    });
  };
  render() {
    return (
      <div>
        <input
          value={this.state.value}
          placeholder={"Click me to open keyboard"}
          onClick={this.showKeyboard}
          onChange={e => this.handleChangeValue(e.target.value)}
        />
        <TooBored
          value={this.state.value}
          // components state
          visible={this.state.toggleKeyboardVisibility}
          // handlers
          handleKeyboardVisiblity={this.toggleKeyboardVisibility}
          handleSubmit={this.handleKeyboardSubmit}
          handleChange={this.handleChangeValue}
          handleClear={this.handleClearValue}
          actions={[
            {
              type: "toggleKeyboard",
              text: "Toggle"
            },
            {
              type: "spaceKey",
              text: "Space"
            },
            {
              type: "deleteKey",
              text: "Delete"
            },
            {
              type: "submitKey",
              text: "Submit"
            },
            {
              type: "clearKey",
              text: "Clear"
            }
          ]}
        />
      </div>
    );
  }
}