An open API service indexing awesome lists of open source software.

https://github.com/domness/cloudsponge-vue

Vue component to add the CloudSponge Address book
https://github.com/domness/cloudsponge-vue

cloudsponge cloudsponge-vue component vue

Last synced: 2 months ago
JSON representation

Vue component to add the CloudSponge Address book

Awesome Lists containing this project

README

        

# CloudSponge for Vue 3

## Installation

CloudSponge Vue can be installed using the following methods:

```
yarn add cloudsponge-vue
```

or

```
npm i --save cloudsponge-vue
```

## Props

- apiKey
- CloudSponge API Key
- https://www.cloudsponge.com/developer/getting-started/
- afterSubmit
- Callback function when contacts have been submitted
- config
- CloudSponge Configuration
- https://www.cloudsponge.com/developer/address-book-widget/options/

## Usage

### Install as component

```javascript
import { createApp } from 'vue';
import { CloudSpongeVue } from 'cloudsponge-vue';

const app = createApp({});

app.component('cloudsponge-vue', CloudSpongeVue);
app.mount('#app');
```

### Install as plugin

```javascript
import { createApp } from 'vue';
import { CloudSpongeVuePlugin } from 'cloudsponge-vue';

const app = createApp({});
CloudSpongeVuePlugin.install(app);
app.mount('#app');
```

### Usage

```vue




Loading...


Add friends from your contacts


import { defineComponent } from 'vue';

export default defineComponent({
name: 'MyComponent',
methods: {
submittedContacts(contacts) {
console.log('CloudSponge: submitted contacts');
const emails = contacts.map((c) => c.selectedEmail());
}
}
});

```