You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue3-phone-number-input

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-phone-number-input

A Vue3 Phone Number Input Component with validation check

1.1.2
latest
Source
npmnpm
Version published
Weekly downloads
75
-35.34%
Maintainers
1
Weekly downloads
 
Created
Source

vue3-phone-number-input

International Phone Number Input with Country Code.

Getting started

Install the plugin:

  • With npm

      npm install vue3-phone-number-input
    
  • With yarn

      yarn add vue3-phone-number-input
    
  • Add the plugin into your app:

      import { createApp } from 'vue'
      import App from './App.vue'
    
      import Vu3PhoneNumberInput from 'vue3-phone-number-input'
      import 'vue3-phone-number-input/dist/vue3-phone-number-input.css';
    
      const app  = createApp(App)
      .mount('#app')
    
      app.use(Vu3PhoneNumberInput)
    
    

Available options

    app.use(Vu3PhoneNumberInput, {
        placeholder: '11 111 11 11',
        countryPlaceholder: 'Search',
        countryLebel: 'Select Country',
    })
  • Use the PhoneNumberWithCountryCode component:
  <template>
        <PhoneNumberWithCountryCode
            v-model:phone_number="form.phone_number" 
            v-model:country_code="form.country_code" 
        />

  </template>
    <script>
        import { reactive } from '@vue/reactivity'

        export default {
            name: 'App',
            setup() {
                const form = reactive({
                    phone_number: '',
                    country_code: ''
                })

                return {
                    form
                }
            },
        }
    </script>

Available props

    <template>
        <PhoneNumberWithCountryCode
            v-model:phone_number="form.phone_number" 
            v-model:country_code="form.country_code"
            placeholder="11 111 11 11"
            country-placeholder="Search"
            country-lebel="Select Country"
        />
  </template>

Keywords

Vue3

FAQs

Package last updated on 10 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts