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 🙏

© 2024 – Pkg Stats / Ryan Hefner

jb-pin-input-react

v2.3.0

Published

pin input react component

Downloads

19

Readme

JBPinInput React component

this component is React.js wrapper for jb-pin-input web component with these benefits:

  • smart paste algorithm
  • mobile freindly
  • light and fast
  • support typescript
  • accept persian & arabic number char

sample in codepen:https://codepen.io/javadbat/pen/zYPEqNJ sample in github:https://javadbat.github.io/jb-pin-input

install

run following command to install it with npm

npm i jb-pin-input-react

usage

just import the package and use it like other react component

import {JBPinInput} from 'jb-pin-input-react'

<JBPinInput></JBPinInput>

char length

if you want to change the pin length to 5digit or 10 digit or anything elese you just have to provide ti to charLength Prop

<JBPinInput charLength={5}></JBPinInput>

autofocus

if you want pin input get focus as rendered in app just add autofocus props

<JBPinInput autofocus></JBPinInput>

set custome style

in some cases in your project you need to change defualt style of web-component for example you need zero margin or different border-radius and etc.
if you want to set a custom style to this web-component all you need is to set css variable in parent scope of web-component | css variable name | description | | ------------- | ------------- | | --jb-pin-input-inputs-wrapper-width | width of inputs wrapper,default is 100% | | --jb-pin-input-bottom-line-color | color of bottom line of each number. default value is #9DA6B6 | | --jb-pin-input-bottom-line-border-radius | border radius of bottom line. default value is 16px | | --jb-pin-input-bottom-line-height | height of bottom line of each number. default value is 4px | | --jb-pin-input-bottom-line-display | display of bottom line of each number. default value is block | | --jb-pin-input-bottom-line-color-active | color of bottom line of each number when user focus on it. default value is #1565D8 | | --jb-pin-input-wrapper-border-width | border width of each number input wrapper. default value is 0 | | --jb-pin-input-wrapper-border-color | border color of each number input wrapper. default value is black | | --jb-pin-input-wrapper-border-style | border style of each number input wrapper. default value is solid | | --jb-pin-input-wrapper-border-color-active | border color of each number input wrapper when user focus on it. default value is #1565D8 | | --jb-pin-input-pin-color | color of inputed text.default value is #333 | | --jb-pin-input-pin-height | height of each number input. default value is 40px | | --jb-pin-input-pin-font-size | font size of each number input. default value is 24 |
| --jb-pin-input-pin-font-weight | font weight of each number input. default value is 900 |
| --jb-pin-input-wrapper-box-shadow | border width of each number input wrapper. default value is none | | --jb-pin-input-error-message-margin | margin of error message. default value is 0 | | --jb-pin-input-error-message-color | color of error message. default value is #dc3545 |