mobin-code-input
TypeScript icon, indicating that this package has built-in type declarations

0.0.24 • Public • Published

mobin-code-input

mobin-code-input is a masked input that can be used to enter all sorts of codes e.g. security codes when two-factor authenticating.

Instalation

$ npm i mobin-code-input

Use

import CodeInput from 'mobin-code-input';
import 'mobin-code-input/dist/style.css';

<CodeInput
	fields={5}
	value={value}
	type='number'
	onChange={(value) => {
		setValue(value)
	}}
/>

Do not forget to import CSS file.

API Reference

API Type required Default Description
fields number - Number of input fields
value string, undefiend undefiend Default value of code input
type 'string' , 'password' , 'number' - Type of code inputs
onChange function - Return the input value
disabled boolean false Disable code input
autoFocus boolean true Set autoFocus on first input field
className string - Set className and style for container
inputClassName string - Set className and style for inputs

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.244latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.244
0.0.231
0.0.211
0.0.201
0.0.190
0.0.180
0.0.171
0.0.160
0.0.150
0.0.140
0.0.130
0.0.120
0.0.111
0.0.100
0.0.91
0.0.80
0.0.71
0.0.61
0.0.50
0.0.41
0.0.30
0.0.20
0.0.11
0.0.01

Package Sidebar

Install

npm i mobin-code-input

Weekly Downloads

15

Version

0.0.24

License

none

Unpacked Size

125 kB

Total Files

9

Last publish

Collaborators

  • mobin-libs