Skip to content
Design System
GitHub

Phone input

v0.23.0Beta

A phone number with its country, formatted as you type, stored as E.164.

API reference

Generated from the types. Every part also takes className.

PhoneInput

value
string
onValueChange
(e164: string | undefined, country: CountryCode) => void
defaultCountry
CountryCode = "TW"
countryOptions
CountryCode[]Limit the country list, e.g. the countries you operate in.
placeholder
string
disabled
boolean
readOnly
boolean
id
string
aria-label
stringWins over labels.phoneNumber as the box's name.
labels
Partial<PhoneInputLabels>The words it says, to translate them.
locale
string = "en"The language of the country names and their order (a BCP 47 tag such as "zh-TW"). English when left out.