Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

@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

Keywords

none

install

npm i @tammo/react-iban

Downloadsweekly downloads

16

version

0.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability