jatui

PhoneInput

International phone input with country selector β€” outputs E.164

Demo

Props

PropTypeDefaultDescription
valuestring""E.164 phone number (bindable)
namestring""Hidden input name for form submission
defaultCountryCountryCode"US"Initial country selection
placeholderstring"Phone number"Input placeholder
requiredbooleanfalseMark field required
disabledbooleanfalseDisable the input
onChange(value: string) => void-Change callback with E.164 value

Notes

  • Formats numbers with libphonenumber-js AsYouType as the user types
  • Auto-detects country when the user types a + prefix
  • Caps national digits at the country's example number length
  • The hidden <input name="…"> carries the E.164 value for native <form> actions