🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ui-phone-input

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ui-phone-input

A simple Ionic based phone input component

0.0.4
latest
npm
Version published
Weekly downloads
7
600%
Maintainers
1
Weekly downloads
 
Created
Source

ui-phone-input

npm version

A simple @angular/ionic based phone input component

Install

npm install ui-phone-input --save

or

yarn add ui-phone-input

Usage

Import the UiPhoneInputModule in your Module

import { UiPhoneInputModule } from 'ui-phone-input';

@NgModule({
  imports: [UiPhoneInputModule],
})
export class Module {}

Use ui-phone-input component in your template

<ui-phone-input
  [value]="phoneNumber"
  (ionChangePhoneNumber)="phoneNumber = $event"
  (ionChangeValidity)="isValid = $event"
  (ionChangeCountry)="country = $event"
  placeholder="(631) 888-8888"
>
</ui-phone-input>

API

Inputs

@InputPurposeType
valueThe telephone numberstring
placeholderInput placeholderstring
countryCountry ISO codestring (2 character ISO code, defaults to 'US')
noResultsTextText to be displayed when searching countriesstring (Defaults to 'No Results')

Outputs

@OutputPurpose
ionChangePhoneNumberTriggered when the phone number changes value and can be parsed.
ionChangeCountryTriggered when the country changes value.
ionChangeValidityTriggered when the phone number validity changes.

Features

  • Emoji Based Flag Support
  • Emits parsed phone number with country code
  • Emits ISO country code
  • Automatic search when country dialog is open. Just type to search.

Nice to Haves / TODOS

  • Test coverage
  • A11y audit (keyboard controls, etc..)
  • Additional internationalization coverage

FAQs

Package last updated on 17 Aug 2020

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