0.0.24 • Published 9 months ago

mobin-code-input v0.0.24

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

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

APITyperequiredDefaultDescription
fieldsnumber-Number of input fields
valuestring, undefiendundefiendDefault value of code input
type'string' , 'password' , 'number'-Type of code inputs
onChangefunction-Return the input value
disabledbooleanfalseDisable code input
autoFocusbooleantrueSet autoFocus on first input field
classNamestring-Set className and style for container
inputClassNamestring-Set className and style for inputs
0.0.24

9 months ago

0.0.20

1 year ago

0.0.21

1 year ago

0.0.23

1 year ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago