0.1.5 • Published 2 years ago

react-int-phone-input v0.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

React-Int-Phone-Input

A lightweight React international phone number input with taking UX in consideration Alt text

Live Demo

Demo

Installation

npm install react-int-phone-input --save

Usage

import React, {useState} from 'react';
import PhoneNumberInput from 'react-int-phone-input';

const App = () => {
    const [value, setValue] = useState();

    return (
        <PhoneInput
            value={value}
            onChange={setValue}
        />
    )
}

- Default country

You can set the default selected country by using defaultCountry

import React, {useState} from 'react';
import PhoneNumberInput from 'react-int-phone-input';

const App = () => {
    const [value, setValue] = useState();

    return (
        <PhoneInput
            value={value}
            onChange={setValue}
            defaultCountry={'GB'}
        />
    )
}

Props

NameTypeDescriptionDefaultExample
showCountryCodeBooleanTo render the country code in the UItruefalse
defaultCountrystringinitial country'US''US'
0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago