npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@intl-ui/angular

v1.0.3

Published

Angular components and directives for international UI: phone input, country selector. Signal-based, standalone, accessible.

Readme

@intl-ui/angular

npm bundle types license

Angular components and directives for international phone input. Signal-based, standalone, accessible.

Part of the @intl-ui ecosystem.

Live Demo  ·  React version  ·  GitHub


Install

npm install @intl-ui/angular
# or
pnpm add @intl-ui/angular
# or
yarn add @intl-ui/angular

Peer dependencies: @angular/core and @angular/forms (v17+).


Quick start

import { Component, signal } from '@angular/core';
import { IntlPhoneInputComponent } from '@intl-ui/angular';

@Component({
  standalone: true,
  imports: [IntlPhoneInputComponent],
  template: `
    <intl-phone-input [defaultCountry]="'co'" [(value)]="phone" />
    <p>E.164: {{ phone() }}</p>
  `,
})
export class AppComponent {
  phone = signal('');
}

That's it. See it running in the live demo.


Usage

1. Standalone component (quickest)

import { Component, signal } from '@angular/core';
import { IntlPhoneInputComponent } from '@intl-ui/angular';

@Component({
  standalone: true,
  imports: [IntlPhoneInputComponent],
  template: `
    <intl-phone-input
      [defaultCountry]="'us'"
      [(value)]="phone"
      (phoneChange)="onPhoneChange($event)"
    />
  `,
})
export class MyComponent {
  phone = signal('');

  onPhoneChange(meta) {
    console.log(meta.isValid, meta.parsed?.e164);
  }
}

2. Reactive Forms (ControlValueAccessor)

import { Component } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import {
  IntlPhoneInputComponent,
  IntlPhoneInputValueAccessorDirective,
  IntlPhoneValidators,
} from '@intl-ui/angular';

@Component({
  standalone: true,
  imports: [
    ReactiveFormsModule,
    IntlPhoneInputComponent,
    IntlPhoneInputValueAccessorDirective,
  ],
  template: `
    <form [formGroup]="form">
      <intl-phone-input formControlName="phone" [defaultCountry]="'co'" />
    </form>
  `,
})
export class MyFormComponent {
  form = new FormGroup({
    phone: new FormControl('', [
      Validators.required,
      IntlPhoneValidators.validPhone(),
    ]),
  });
}

3. Headless store (full control)

import { Component } from '@angular/core';
import { createPhoneInputStore, type CountryIso2 } from '@intl-ui/angular';

@Component({
  standalone: true,
  template: `
    <button (click)="store.toggleDropdown()">
      {{ store.country()?.flag ?? 'Pick' }}
    </button>
    <input
      type="tel"
      [value]="store.inputValue()"
      (input)="onInput($event)"
    />
    <p>E.164: {{ store.value() }}</p>
    <p>Valid: {{ store.isValid() }}</p>
  `,
})
export class HeadlessComponent {
  store = createPhoneInputStore({ initialCountry: 'gb' as CountryIso2 });

  onInput(event: Event) {
    this.store.handleInput((event.target as HTMLInputElement).value);
  }
}

API

IntlPhoneInputComponent

| Input | Type | Default | Description | |-------|------|---------|-------------| | defaultCountry | CountryIso2 | - | Initial country ISO2 code | | defaultValue | string | '' | Initial phone value (E.164) | | disableCountryGuess | boolean | false | Disable auto-detection from digits | | countries | Country[] | all | Custom country list | | preferredCountries | CountryIso2[] | [] | Pin countries to top | | showSearch | boolean | true | Show search in dropdown |

| Output | Type | Description | |--------|------|-------------| | value | model<string> | Two-way binding for E.164 value | | phoneChange | ValueChangeMeta | Emits on every value change | | countryChange | Country | Emits when country changes |

IntlPhoneValidators

| Validator | Description | |-----------|-------------| | validPhone(country?) | Validates phone format (optionally for a specific country) | | allowedCountries(iso2[]) | Restricts to specific countries |

createPhoneInputStore(options)

Signal-based store for building custom UIs. Returns signals for value, inputValue, country, parsed, isValid, isOpen, visibleCountries, and action methods.

Bundle size

| Package | gzip | |---------|------| | @intl-ui/core | ~9.4 KB | | @intl-ui/angular | ~18 KB | | Total | ~27 KB |

Related

License

MIT © John Alberto López Hernández