Gathering detailed insights and metrics for ngx-mat-intl-tel-input-triparc
Gathering detailed insights and metrics for ngx-mat-intl-tel-input-triparc
Gathering detailed insights and metrics for ngx-mat-intl-tel-input-triparc
Gathering detailed insights and metrics for ngx-mat-intl-tel-input-triparc
npm install ngx-mat-intl-tel-input-triparc
Typescript
Module System
Node Version
NPM Version
70.5
Supply Chain
99
Quality
84.1
Maintenance
100
Vulnerability
99.6
License
TypeScript (73.1%)
HTML (11.21%)
SCSS (10.69%)
JavaScript (5%)
Total Downloads
42,067
Last Day
5
Last Week
48
Last Month
178
Last Year
42,067
MIT License
251 Commits
2 Forks
5 Branches
1 Contributors
Updated on May 05, 2025
Latest Version
17.9.3
Package Id
ngx-mat-intl-tel-input-triparc@17.9.3
Unpacked Size
0.97 MB
Size
703.02 kB
File Count
22
NPM Version
9.8.1
Node Version
18.18.2
Published on
May 05, 2025
Cumulative downloads
Total Downloads
Last Day
-16.7%
5
Compared to previous day
Last Week
128.6%
48
Compared to previous week
Last Month
-32.6%
178
Compared to previous month
Last Year
0%
42,067
Compared to previous year
1
An Angular Material package for entering and validating international telephone numbers. It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods.
Supports:
$ npm install libphonenumber-js --save
$ npm install ngx-mat-intl-tel-input-v16 --save
Add NgxMatIntlTelInputComponent
to your component file:
1imports: [NgxMatIntlTelInputComponent];
Refer to main app in this repository for working example.
1<form #f="ngForm" [formGroup]="phoneForm"> 2 <ngx-mat-intl-tel-input 3 [preferredCountries]="['us', 'gb']" 4 [enablePlaceholder]="true" 5 [enableSearch]="true" 6 name="phone" 7 describedBy="phoneInput" 8 formControlName="phone" 9 ></ngx-mat-intl-tel-input> 10</form>
1 2<form #f="ngForm" [formGroup]="phoneForm"> 3 <ngx-mat-intl-tel-input 4 [preferredCountries]="['us', 'gb']" 5 [enablePlaceholder]="true" 6 [enableSearch]="true" 7 name="phone" 8 (countryChanged)="yourComponentMethodToTreatyCountryChangedEvent($event)" // $event is a instance of current select Country 9 formControlName="phone"></ngx-mat-intl-tel-input> 10</form> 11
If you want to show the sample number for the country selected or errors , use mat-hint anf mat-error as
1<form #f="ngForm" [formGroup]="phoneForm"> 2 <ngx-mat-intl-tel-input 3 [preferredCountries]="['us', 'gb']" 4 [onlyCountries]="['us', 'gb', 'es']" 5 [enablePlaceholder]="true" 6 name="phone" 7 formControlName="phone" 8 #phone 9 ></ngx-mat-intl-tel-input> 10 <mat-hint>e.g. {{phone.selectedCountry.placeHolder}}</mat-hint> 11 <mat-error *ngIf="f.form.controls['phone']?.errors?.required" 12 >Required Field</mat-error 13 > 14 <mat-error *ngIf="f.form.controls['phone']?.errors?.validatePhoneNumber" 15 >Invalid Number</mat-error 16 > 17</form>
| Options | Type | Default | Description |
| ------------------ | ---------- | ----------- | ----------------------------------------------------------------------------------- | --- |
| preferredCountries | string[]
| []
| List of country abbreviations, which will appear at the top. |
| onlyCountries | string[]
| []
| List of manually selected country abbreviations, which will appear in the dropdown. | |
| inputPlaceholder | string
| undefined
| Placeholder for the input component. |
| enablePlaceholder | boolean
| true
| Input placeholder text, which adapts to the country selected. |
| enableSearch | boolean
| false
| Whether to display a search bar to help filter down the list of countries |
| format | string
| default
| Format of "as you type" input. Possible values: national, international, default |
| describedBy | string
| undefined
| Use aria-described by with the input field |
./projects/ngx-mat-intl-tel-input
./src/lib
with new functionality.$ npm run build_lib
$ npm run copy-files
$ npm run npm_pack
$ npm run package
After building and creating package, you can use it locally too.
In your project run:
$ npm install --save {{path to your local '*.tgz' package file}}
No vulnerabilities found.