vue-native-contact-picker

Vue wrapper for ContactPicker API
375
Install
npm install vue-native-contact-picker
Latest Version:0.0.6
Vue:3
Last Updated:Mar 15, 2024
Links: GitHub  ·  npm
Maintainer: fanreza

vue-native-contact-picker

Vue wrapper for ContactPicker API

This feature require user to accept permission and the website must run in secure environment (https)

Install

`npm i vue-native-contact-picker`

Import and register component

Global

import { createApp } from 'vue'
import App from './App.vue'

import { ContactPicker } from 'vue-native-contact-picker'

const app = createApp(App)
app.component('ContactPicker', ContactPicker)

Local

<script setup lang="ts">
import { ContactPicker } from 'vue-native-contact-picker'

const handlePicked = (contacts: any) => {
  console.log(contacts)
}

const handleErrors = (error: string) => {
  console.error(error)
}
</script>

<template>
  <ContactPicker
    :props-select="['name', 'email', 'tel', 'address', 'icon']"
    :multiple="true"
    @errors="handleErrors"
    @picked="handlePicked"
  />
</template>

Browser Support

Specification

Browser Version
Chrome Mobile 120

Props

Name Value Default
propsSelect Array of name, email, tel, address, icon ['name', 'email', 'tel', 'address', 'icon']
multiple boolean true

Events

Name Value
picked Object { name: Array of string, email: Array of string, tel: Array of string, address: Array of string, icon: Array of Blob }
errors Object Errors

Related Packages

vue

The progressive JavaScript framework for building modern web UI.

468,054,189 54,906
vue
eslint-plugin-vue

Official ESLint plugin for Vue.js

266,364,830 4,591
@vueuse/shared
260,835,866 22,398
@vitejs/plugin-vue

The official plugin for Vue SFC support in Vite.

257,315,514 686
@vueuse/core

Collection of essential Vue Composition Utilities

256,285,643 22,398

Version History

Version Released Vue License
0.0.6 ^3.4.15
0.0.5 ^3.4.15
0.0.4 ^3.4.15
0.0.3 ^3.4.15
0.0.2 ^3.4.15