Headless Phone Input Component For React

Category: Form
Author:benaubin
Views Total:7 views
Official Page:Go to website
Publish Date:July 1, 2020
License:MIT

A React component built with hooks that makes it simple to handle telephone numbers on your web app.

This component helps you build a UI that gracefully guides your users towards unambiguous phone number formats. And you get the result in standard e164 format: ready for use with any telephony service.

Key Features:

  • 100% headless: Bring your own UI. You can use almost any input component you already have
  • Lets users copy & paste phone numbers of any format
  • Typescript support
  • Built-in lazy-loading with progressive enhancement (clocks in at 40KB without lazy-loading)
  • Detects the associated country, enabling international phone input.
  • Lets users copy & paste phone numbers of any format
  • Acts like a normal input: Doesn’t glitch if a user edits in-place or deletes template characters
  • Validates number plausibility
  • External state is standard e164 format

Installation:

# Yarn
$ yarn add react-headless-phone-input libphonenumber-js

# NPM
$ npm i react-headless-phone-input libphonenumber-js --save

Preview:

Headless Phone Input Component For React

You Might Be Interested In:

Leave a Reply