2.2.3 • Published 8 months ago
@berlitz/phone-input v2.2.3
PhoneInput 
Berlitz phone input, is a text input field which comes with a dropdown that contains every available country codes.
When to use this component
Input of any type of phone number
Installation
yarn add @berlitz/phone-inputProps
All props from @berlitz/input component, as well as props from react-phone-number-input
| Prop | Type | Required | Default | Notes |
|---|---|---|---|---|
| ariaDescribedby | String | |||
| autocomplete | String | |||
| button | Bool | add an arrow button to the right of the input | ||
| defaultValue | String | |||
| disabled | Bool | |||
| id | String | |||
| invalid | Bool | |||
| name | String | X | ||
| onBlur | Func | |||
| onChange | Func | |||
| onClick | Func | onClick handler to attach to the optional button | ||
| placeholder | String | eg. "Enter phone number" | ||
| required | Bool | |||
| type | String | X | ||
| value | String | |||
| country | String | eg. "AU" | ||
| displayInitialValueAsLocalNumber | Bool | true | ||
| labels | Object | Custom translation (including country names). | ||
| metadata | Object | Custom libphonenumber-js "metadata". | ||
| internationalIcon | Node | Custom "International" icon | ||
| numberInputComponent | Node | Custom phone number component | ||
| countrySelectComponent | Node | Custom country component |
Refer to react-phone-number-input for more info
Usage
import React from 'react'
import PhoneInput from '@berlitz/phone-input'
const MyApp = () => (
<PhoneInput
placeholder="Enter phone number"
country="AU"
displayInitialValueAsLocalNumber
/>
)2.2.1
8 months ago
2.2.0
8 months ago
2.2.3
8 months ago
2.2.2
8 months ago
2.1.6-test.25
4 years ago
2.1.5
4 years ago
2.1.4
4 years ago
2.1.3
5 years ago
1.0.1-alpha.63
5 years ago
2.1.2
5 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.0
5 years ago
0.1.3-alpha.300
5 years ago
0.1.2
6 years ago
0.1.2-alpha.3077
6 years ago
0.1.1-beta
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago