Skip to main content

rn-international-phone-number

International mobile phone input for React Native, Expo and React Native Web. Country dial code selector, flag picker, auto phone mask, validation, line-type detection, smart paste, and i18n for 33 languages.

npm versionnpm downloadsGitHub starsISC License

rn-international-phone-number preview โ€” React Native international phone number input, country dial code selector, flag picker with auto phone mask, validation and i18n

Featuresโ€‹

  • ๐ŸŒŽ Phone Input Mask โ€“ Auto-formatting per selected country
  • โœ… Validation โ€“ Check phone number, with optional onValidationChange callback
  • ๐Ÿ“ž Line Type Detection โ€“ Tell MOBILE, FIXED_LINE, TOLL_FREE, VOIP and more apart
  • ๐Ÿ“‹ Smart Paste โ€“ Paste an E.164 number and the country switches automatically
  • ๐Ÿ’ก Dynamic Placeholder โ€“ Country-aware example number as placeholder (placeholderType="number")
  • ๐Ÿช Headless Hook โ€“ usePhoneInput exposes all state + setters for fully custom UIs
  • ๐Ÿ“ฑ Cross-Platform โ€“ Works seamlessly on iOS, Android and Web
  • ๐Ÿงฉ Flexible Integration โ€“ Supports both React Native CLI & Expo
  • ๐Ÿ‘จโ€๐Ÿ’ป Component Versatility โ€“ Works with functional & class components
  • ๐ŸŽจ Modern UI โ€“ Custom component with sleek design
  • ๐Ÿˆถ Internationalization โ€“ Supports 33 languages (ISO 639-1 and ISO 639-2)
  • ๐Ÿงช Test Ready โ€“ Smooth testing integration
  • โ™ฟ Accessibility โ€“ Accessibility standards for screen readers

Try it outโ€‹

Next stepsโ€‹

Support the projectโ€‹

If this library saves you time, consider buying me a coffee โ˜•.