RE

React Phone Number Input

react-phone-number-input

Telephone number input React component

Utilities
react
phone
number
input
telephone
international
react-phone-number-input
Utilities
javascript
npm
Stars
416
Weekly
1.7M
Open issues
5
Bundle
~25 kB

Installation

npm install react-phone-number-input

Code example

import { usePhoneNumberInput } from "react-phone-number-input";

export function Example() {
  const value = usePhoneNumberInput();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by catamphetamine
  • 1.7M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 5 open issues on GitHub

FAQs

Alternatives & similar libraries