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

react-telephone-input

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-telephone-input

React component for entering and validating international telephone numbers. Inspired from the awesome jquery plugin for the same - https://github.com/Bluefieldscom/intl-tel-input.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by227.21%
Maintainers
1
Weekly downloads
 
Created
Source

Reactjs Component for International Telephone Input

Inspired from the awesome jquery plugin for International Telephone Input.

This one is written as a reactjs component.

How it looks

// Use declaratively within another react components render method
var ReactTelInput = require('react-telephone-input');
<MyAwesomeReactComponent>
  <ReactTelInput defaultCountry="in"/>
</MyAwesomeReactComponent>

// or render standalone
var ReactTelInput = require('react-telephone-input');
React.renderComponent(<FlagBearer defaultCountry="in"/>, document.getElementById('my-container'));

Note - You will need to change the location of flags.png in the style.less file.

Features

  • Automatically format the number as the user types
  • Navigate the country dropdown by typing a country's name, or using up/down keys
  • Selecting a country from the dropdown will update the dial code in the input
  • Typing a different dial code will automatically update the displayed flag
  • Country names in the dropdown also include localised versions in brackets
  • Dropdown appears above or below the input depending on available space/scroll position

You can try the app by downloading everything and running the commands given below -

$ npm install
$ npm start

go to your browser and type http://127.0.0.1:1337/example/index.html

Keywords

FAQs

Package last updated on 29 Nov 2014

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