@tammo/react-iban

0.0.2 • Public • Published

react IBAN

travis ci build status

Input component for european IBAN numbers. It does format the user input to the human-machine readable format. It does not validate the IBAN.

install

yarn add @tammo/react-iban

changelog

  • v0.0.2
    • peer dependencies downgrade
  • v0.0.1
    • initial version

props

onChange - will receive the IBAN in machine readable form (no spaces). It will receive undefined, if the user removes all chars.

initialValue - to set the IBAN that is shown on first render.

All props will be passed down to the input element.

styling

There is no CSS. Please set your own classNames.

usage

Import default component:

import IBAN from '@tammo/react-iban'

You can calso use the formatting function. The function takes a string as the only parameter.

import { format } from '@tammo/react-iban'

output

A single input element:

<input type="text" size="27" />

example

As if the user would have input their IBAN. value is what onChange received and format used the exported format function.

screeshot of a filled IBAN input

Readme

Keywords

none

Package Sidebar

Install

npm i @tammo/react-iban

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

249 kB

Total Files

11

Last publish

Collaborators

  • tammo