input_code
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

How to use ?

import { CodeInput } from "./inputCode"
...
export default () => {
  const [code, setCode] = useState("")

  return <CodeInput values={code} title="Enter your digit code" fields={4} onComplete={(val: string) => setCode(val)} />
}

Properties ?

name details
fields number of boxes, default is 6
values value is string
className classname of wrapper
onChange event's fired when one box get updated
onComplete event's fired when one box get updated

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i input_code

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

13.7 kB

Total Files

7

Last publish

Collaborators

  • stigerdieu