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

pin-input

v2.0.0

Published

react pin input component

Downloads

31

Readme

React PINInput

React PINInput component .

Installation

npm i --save pin-input

Usage

Numeric Input

<PINInput
          type='number'
          fields={4}
        />

Text input:

<PINInput
          type='text'
          fields={4}
        />

Password input:

<PINInput
          type='password'
          fields={4}
        />

Password input with numeric input type:

<PINInput
          type='password'
          inputType='number'
          fields={4}
        />

Password input with showing last typed input value:

<PINInput
          type='password'
          inputType='number'
          showLastTypedValue={true}
          fields={4}
        />

Passing filter key codes and characters :

<PINInput
          type='text'
          fields={4}
          filterKeyCodes={[189, 190]}
          filterChars= {['-', '.']}
        />

Passing class for input wrapper div and for input:

<PINInput
          type='text'
          fields={4}
          inputClassName={'pin-input'}
          inputWrapperClassName={'pin-input-wrapper'}
        />

Passing default value

<PINInput
          type='text'
          fields={4}
          value={'1111'}
        />

Passing readOnly param

<PINInput
          type='text'
          fields={4}
          readOnly={true}
        />

Pass callback functions


const someFunction = () =>{
  
}

<PINInput
          type='text'
          fields={4}
          onChange={someFunction}
          onKeyDown={someFunction}
        />

Props:

| Property | Type | Description | |:---|:---|:---| | type | string | Only types like: text, number, password are accepted.| | inputType | string | The inputType prop you can set with the type="password" for accepting password type (number or text)| | fields | number | Allowed amount of characters to enter. | | value | string | Setting the initial value of code input field. | | onChange | func | Function, which is called whenever there is a change of value in the input box. | | onKeyDown | func | Function, key down call back function | | inputClassName | string | Add classname to the input element. | | inputWrapperClassName | string | Add classname to the div element. | | readOnly | bool | When present, it specifies that the element should be disabled. | | autoFocus | bool | Setup autofocus on the first input, true by default. | | filterKeyCodes | array | Filter characters on key down. | | filterChars | array | Filter characters. | default: ['-', '.'] | | pattern | string | The pattern prop specifies a regular expression that the element's value is checked against. |

License

MIT