2.1.5 • Published 2 years ago

@berlitz/phone-input v2.1.5

Weekly downloads
4,760
License
MIT
Repository
-
Last release
2 years ago

PhoneInput npm version

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-input

Props

All props from @berlitz/input component, as well as props from react-phone-number-input

PropTypeRequiredDefaultNotes
ariaDescribedbyString
autocompleteString
buttonBooladd an arrow button to the right of the input
defaultValueString
disabledBool
idString
invalidBool
nameStringX
onBlurFunc
onChangeFunc
onClickFunconClick handler to attach to the optional button
placeholderStringeg. "Enter phone number"
requiredBool
typeStringX
valueString
countryStringeg. "AU"
displayInitialValueAsLocalNumberBooltrue
labelsObjectCustom translation (including country names).
metadataObjectCustom libphonenumber-js "metadata".
internationalIconNodeCustom "International" icon
numberInputComponentNodeCustom phone number component
countrySelectComponentNodeCustom 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.1.6-test.25

2 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

1.0.1-alpha.63

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.0

4 years ago

0.1.3-alpha.300

4 years ago

0.1.2

4 years ago

0.1.2-alpha.3077

4 years ago

0.1.1-beta

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago