1.6.9 • Published 4 years ago

@invisionag/iris-react-digit-input v1.6.9

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago
import DigitInput from '@invisionag/iris-react-digit-input';

react-digit-input is a component that allows you to format inputs by clearly dividing them into each digit. It renders an input field for each digit and combines them into a single value again when needed.

Usage

Basic

Renders 6 one digit input fields that act like a single input.

<DigitInput
  onValueChange={value => {
    console.log(value);
  }}
/>

length

The length prop determines the maximum length of the value and the number of input fields rendered. The default length is 6.

<DigitInput
  length={8}
  onValueChange={value => {
    console.log(value);
  }}
/>

Other

All other props such as event handlers or html attributes will be passed down directly to each of the rendered input fields.

<DigitInput
  placeholder="0"
  onKeyDown={e => {
    e.stopPropagation();
  }}
  onValueChange={value => {
    console.log(value);
  }}
/>
1.6.9

4 years ago

1.6.8

4 years ago

1.6.7

4 years ago

1.6.6

4 years ago

1.6.5

4 years ago

1.6.5-alpha.0

4 years ago

1.6.4

4 years ago

1.6.3

4 years ago

1.6.0

4 years ago

1.5.20

5 years ago

1.5.18

5 years ago

1.5.17

5 years ago

1.5.17-alpha.13

5 years ago

1.5.17-alpha.11

5 years ago

1.5.17-alpha.10

5 years ago

1.5.17-alpha.8

5 years ago

1.5.16

5 years ago

1.5.9

5 years ago

1.5.8

5 years ago

1.5.6

5 years ago

1.5.5

5 years ago

1.5.4

5 years ago

1.1.12

5 years ago

1.1.12-alpha.0

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.5

5 years ago

1.1.2

5 years ago

1.1.0

5 years ago

1.1.0-alpha.1

5 years ago

1.1.0-alpha.0

5 years ago