Overview
The vue-phone-number-input
is a VueJS plugin for creating a beautiful text field to format phone numbers. It offers features like setting preferred countries, phone number validation, country code retrieval options, phone number formatting while typing, keyboard accessibility, and more. Please note that this plugin is unmaintained and offers separate versions for Vue 2 and Vue 3.
Features
- Preferred Countries Setting: Set preferred countries for phone numbers.
- Validator State: Indicates validity with color change.
- Country Code Retrieval Options: Get country code via the browser or from a network service.
- Phone Number Formatting: Formats phone number as you type.
- Country Search: Easily search for your country in the list.
- Keyboard Accessibility: Navigate countries list using arrow keys.
- Auto Focus: Focuses on the phone number input after selecting a country.
- Translations & VueInputUi Options: Customize with various options and translations.
Installation
Using yarn:
yarn add vue-phone-number-input
Using npm:
npm i --save vue-phone-number-input
Summary
The vue-phone-number-input
plugin for VueJS provides a convenient way to format phone numbers with features like country settings, validation, formatting, accessibility, and more. While it offers a comprehensive list of options for customization, users should be aware that the plugin is currently unmaintained, with separate versions available for Vue 2 and Vue 3.