@teselia/phone
| Install | |
|---|---|
npm install @teselia/phone |
|
| Latest Version: | 1.0.1 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Oct 7, 2026 |
| Links: | GitHub · npm |
@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>.
- 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
Accessible one-time code input (OTP), shipped as a framework-agnostic Web Compon...
Modern phone number formatting library with React/Vue components, TypeScript sup...
WCAG accessibility audit tool — Nuxt layer with report generation, PDF export an...
WCAGify's report schemas, scoring and render-only Nuxt layer, for apps that show...
Accessible international phone input for Vue 3 with country selector, keyboard n...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.1 | ^3.5.0 | MIT | |
| 1.0.0 | ^3.5.0 | MIT |