0.0.23 • Published 20 days ago
mobin-code-input v0.0.23
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 |
0.0.20
20 days ago
0.0.21
20 days ago
0.0.23
20 days ago
0.0.19
5 months ago
0.0.18
5 months ago
0.0.17
5 months ago
0.0.16
5 months ago
0.0.15
5 months ago
0.0.14
5 months ago
0.0.13
5 months ago
0.0.12
5 months ago
0.0.11
5 months ago
0.0.10
5 months ago
0.0.9
5 months ago
0.0.8
5 months ago
0.0.7
5 months ago
0.0.6
6 months ago
0.0.5
6 months ago
0.0.4
6 months ago
0.0.3
6 months ago
0.0.2
6 months ago
0.0.1
6 months ago
0.0.0
6 months ago