Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

international-phone-input-react

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

international-phone-input-react

This library is made by a Button and a Map components.

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
16
433.33%
Maintainers
1
Weekly downloads
 
Created
Source

React Simple Phone Input

A simple and customizable react phone number dropdown component. with country flags and dialCodes.

  • SSR Friendly
  • Customizable
  • Search Country
  • Smallest Bundle Size (About 500kb)
  • Typescript support

Installation

$ npm i international-phone-input-react --save

Usage

import { PhoneInput } from "international-phone-input-react";

<PhoneInput
  phoneNumber={phoneNumber} setPhoneNumber={phoneNumber}
/>

See Demo

Options

Name Type Description Is Required Example
phoneNumber string controlled field value required "569 23 12 123"
setPhoneNumber function phone onChange handler required (e) => { setPhoneNumber(e.target.value)}
error string error message optional
placeholder string phone fields placeholder optional enter phone..
searchPlaceholder string search field placeholder optional Search...
defaultCountry string default country code optional "US"
except array If you want to remove some country to the list. optional ["AF", "AL"]
only array only specific countries optional ["BD", "US", "GE"]
animatedPlaceholder boolean disable/enable placeholder animation optional

Event

Contributing

  • Code style changes not allowed
  • Do not create issues about incorrect or missing country data

Issues or correction

If you face any issues, missing data or wrong data about country, you are welcome to create an issue.

Stay in touch

FAQs

Package last updated on 18 Jan 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