Nucleic Phosphate Modifier

    react-swedish-personal-identity-number-input
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.3 • Public • Published

    React Swedish personal identity number input

    A higher order component for formatting values in input elements as Swedish personal identity numbers

    Build Status NPM version

    Install

    $ npm install --save react-swedish-personal-identity-number-input
    

    Usage

    import React from 'react';
    import { createSwedishPersonalIdentityNumberInput } from 'react-swedish-personal-identity-number-input';
     
    const YourInputComponent = ({ innerRef, ...rest }) => {
      return <input ref={innerRef} {...rest} />;
    }
     
    const SwedishPersonalIdentityNumberInput = createSwedishPersonalIdentityNumberInput(YourInputComponent);
     
    const Demo = () => {
      const [value, setValue] = React.useState();
     
      return <SwedishPersonalIdentityNumberInput value={value} onChange={setValue} />;
    }

    License

    MIT © Jonathan Svenheden

    Keywords

    none

    Install

    npm i react-swedish-personal-identity-number-input

    DownloadsWeekly Downloads

    3

    Version

    0.4.3

    License

    MIT

    Unpacked Size

    16.3 kB

    Total Files

    15

    Last publish

    Collaborators

    • jonathanp