@teselia/phone

Accessible international phone input with country calling code, shipped as a framework-agnostic Web Component. WCAG 2.2 AA by default.
247
Install
npm install @teselia/phone
Latest Version:1.0.1
Vue:3
License:MIT
Last Updated:Oct 7, 2026
Links: GitHub  ·  npm
Maintainer: caicesardev

@teselia/phone

Accessible international phone input with country calling code, shipped as a framework-agnostic Web Component. It meets WCAG 2.2 AA by default and submits one normalized value in E.164 format to any native <form>.

Documentation and demo

  • Searchable country selector: type a country name, an ISO code or a calling code.
  • Formats the number as you type and validates it for the selected country.
  • Pasting an international number selects its country.
  • A real form control: required, validation messages, reset, disabled fieldsets and autofill.
  • Keyboard-first, following the WAI-ARIA combobox pattern. Country names in the page language.
  • Themeable with CSS custom properties, ::part() and :state().

Install

npm install @teselia/phone vue

Or load the self-contained build from a CDN, with nothing else to install:

<script src="https://cdn.jsdelivr.net/npm/@teselia/phone@1"></script>

Usage

import '@teselia/phone'
<form>
  <tes-phone name="phone" label="Phone number" required></tes-phone>
  <button type="submit">Send</button>
</form>

The form submits phone=+34612345678. Listen to input, change or countrychange for live updates; each event carries detail: { value, country, valid }.

Attributes, events, styling, and examples for Vue and React are in the documentation.

Size

Build gzip
npm (ESM), component code only 9.1 KB
npm (ESM), with libphonenumber-js, minified, in an app that already has Vue 43 KB
CDN (IIFE), everything including Vue 68 KB

Most of the weight is the phone number metadata of libphonenumber-js (the min set), which the component needs to format and validate numbers of every country.

Browser support

Current and previous major versions of Chrome, Edge, Firefox and Safari.

License

MIT © Caio Gomes

Related Packages

@teselia/otp

Accessible one-time code input (OTP), shipped as a framework-agnostic Web Compon...

0 0
maskdial

Modern phone number formatting library with React/Vue components, TypeScript sup...

1,047 5
@focusring/wcagify

WCAG accessibility audit tool — Nuxt layer with report generation, PDF export an...

5,246 1
@focusring/wcagify-reporter

WCAGify's report schemas, scoring and render-only Nuxt layer, for apps that show...

175 1
vue-a11y-phone

Accessible international phone input for Vue 3 with country selector, keyboard n...

958 0

Version History

Version Released Vue License
1.0.1 ^3.5.0 MIT
1.0.0 ^3.5.0 MIT