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
1
Weekly
0
Open issues
0
Bundle
~60 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
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

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

FAQs

Alternatives & similar libraries