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

react-custom-virtual-keyboard

v0.0.9

Published

A simple, fully customizable, responsive and complete virtual keyboard for React

Readme

React Custom Virtual Keyboard

A simple, fully customizable, responsive and complete virtual keyboard component for integrate with React.

Peer Dependencies

For a good functionality of this package, the installation will need the following additional packages:

"react": "^16.8.6"
"lodash": "^4.17.15"

Installation

Use the package manager npm to install the keyboard:

npm install --save react-custom-virtual-keyboard

Usage

In general, the keyboard wait a target property, and this must be a DOM node element from the document. It's recommended to save this node for example in the state of you main component, and update this value in the focus (set the target) and blur (unset or null the target) events of your input fields.
The theme property is used to style your keyboard with one of the preset stylesheets, the available themes are:

  • office (default)
  • dark-office
  • console
  • glow-green
  • glow-red
  • glow-blue

There is so many use cases to cover with this package. One of this are a mobile-like behaviour, the keyboard is opened once you tap or click over an input element. if you unfocus (blur) the element, the keyboard must be hidded. In this case, you must use the following properties:

import VirtualKeyboard from 'react-custom-virtual-keyboard';

// ...

render() {
  return (
    // ...
    <VirtualKeyboard
      openAuto
      closeAuto
      target={this.state.YourElementTarget}
      theme={'console'}
    />
  );
}

// ...

Another way is to give to the user the possibility of choice where to show or hide the keyboard, but the event of the pressed key works only if the prop target is set:

import VirtualKeyboard from 'react-custom-virtual-keyboard';

// ...

render() {
  return (
    // ...
    <VirtualKeyboard
      withToggleButton
      target={this.state.YourElementTarget}
      theme={'console'}
    />
  );
}

// ...

Even you can combine the previous property to have a full use keyboard, but be careful, the closeAuto property doesn't work alone.

Know issues

Using in mobile sites, when you focus an input element, the default system keyboard is invoked, and there's not a default way to prevent this. There's a way to solve this issue but require to use read-only input components and use styles to indicate the currently focused element for the user. See this StackOverflow question for more details.

License

MIT