Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-telephone

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-telephone

☎️ Tiniest react input phone component (auto formating included)

  • 1.4.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
75
decreased by-56.9%
Maintainers
1
Weekly downloads
 
Created
Source

react-telephone - Demo

All Contributors


☎️ react-telephone

Tiniest react input phone component (auto formating included)


Demo · Documentation · Twitter Created by Joris

Features

  • 🌐 Follows the E.164 : The international public telecommunication numbering plan
  • 🎨 Easily Customizable
  • 🪶 Lightweight - less than 6kb
  • 📞 Native - it's just a HMTL input
  • 🔌 easily integration - it works without additional configuration (remix, react-hook-form)
  • Controlled mode: coming soon
  • Custom render for Phone.Country and Phone.Number: coming soon

Examples (Demo)

Installation

yarn add react-telephone

or

npm i react-telephone

Usage

import { Phone } from 'react-telephone';

export default function MyComponent() {
  return (
    <Phone>
      <Phone.Country />
      <Phone.Number />
    </Phone>
  );
}

Props

PropDescriptionDefaultValue
defaultCountryDefault country displayed for the country selectorFirst country (Afghanistan)Country ISO2 code (fr, us)

Utils

NameDescription
countriesList of all countries.
getCountryByIsoReturns the country object for a given ISO code.
applyMaskApply the mask to a given phone number.
splitPhoneNumberSplit a phone number into country code and number.
replaceDialCodeReplace the dial code of a phone number.

Contributors

Thanks goes to these wonderful people (emoji key):

Joris
Joris

💻 📖 🤔 👀
Michaël Rézac
Michaël Rézac

🤔 💻
Varshneya Rao
Varshneya Rao

💻

Keywords

FAQs

Package last updated on 14 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc