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

aimc-custom-keyboard

v1.0.4

Published

Custom keyboard for integradtion into mobile web apps.

Readme

aimc-custom-keyboard

Custom keyboard for integradtion into mobile web apps.

NPM JavaScript Style Guide

Install

npm install --save aimc-custom-keyboard

Usage

import React, {Component} from 'react'
import { CustomKeyboard } from 'aimc-custom-keyboard'

class App extends Component {

    constructor(){
        super();

        this.state = {
            result : "",
            showKeyboard : true
        }
    }
    
    //function is passed to the CustomKeyboard component and the resulting text is passed through newResult
    getText = (newResult) =>{
        this.setState({
            result : newResult
        })
    };

//function to handling showing and hiding the keyboard
    showHideKeyboardFunct = () =>{
        this.setState({
            showKeyboard : !this.state.showKeyboard
        });
    };

    render() {

        const inputStyle = {
            width: '80vw',
            height: '1em',
            borderRadius: '8px',
            backgroundColor: '#E9E9E9',
            padding: '3vw',
            margin: '5vw auto'
        };

        const buttonStyle = {
            width: '40vw',
            margin : 'auto 30vw'
        };

        return (
            <div>

                <div style={inputStyle}>Input: {this.state.result}</div>
                <button style={buttonStyle} onClick={e =>{this.showHideKeyboardFunct()}}>Toggle Keyboard</button>
                <CustomKeyboard resultText = {this.state.result}
                                showKeyboardVal={this.state.showKeyboard}
                                showKeyboardFunction={this.showHideKeyboardFunct}
                                typeKeyFunction = {this.getText}
                                useTextSuggestions = {true}
                                suggestions = {["suggestion1", "suggestion2", "suggestion3"]}

                />
            </div>
        )
    }


}
export default App

Props

For the custom keyboard component to function properly it will require values for 5 props. these are as follows:

resultText (required)

string

This is the initial string value for the text in the app. Usually this is an empty string, but in some cases you may wish to start with a non-empty String. The keyboard will use this as a starting point, and any typed characters will be added to the end of it.

showKeyboardVal (required)

boolean

This is a true/false value for whether or not the keyboard is visible. Passing 'true' here will reveal the keyboard and 'false' will hide it. This is primarily used to determine whether or not the keyboard is visible when your app first loads.

showKeyboardFunction (required)

function()

The function passed in the showKeyboardFunction prop will be assigned to the 'hide keyboard' (bottom row, far right) button on the keyboard. As shown in the above example this allows you to use the same function both within the CustomKeyboard component and in your app to manage the visibility consistently.

typeKeyFunction (required)

function(string)

The typeKeyFunction handles the output of the keyboard. This includes typing new characters and backspaces. This function must accept a string as this is the text outputted. In the above example this is shown in the UI using the state.

useTextSuggestions (optional)

boolean

This boolean value should be set to true if you wish to use text suggestions. If omitted the suggestions will not be included by default.

suggestions (required if using text suggestions)

array [string, string, string]

This prop should be an array of 3 strings, these strings will appear in the text suggestions panel. In the above example these values are hard coded but you may populate them using any method you choose. When a user selects a text suggestion any part-typed word will be removed and replaced by the text suggestion.

License

MIT © ewyllie