@wa-ma/vue

Vue 3 Composition API composables for integrating WAMA (WhatsApp Multi-Agent) client messaging in Vue applications.
723
Install
npm install @wa-ma/vue
Latest Version:0.2.0
Vue:3
License:MIT
Last Updated:Sep 14, 2026
Links: npm
Maintainer: araby99

@wa-ma/vue

WAMA WhatsApp Messaging Composition API utilities for Vue 3.


Prerequisites

To use this integration library, you must first register an account and retrieve your WhatsApp instance API key from the WAMA Portal.


Installation

npm install @wa-ma/vue @wa-ma/sdk

Features

  • Vue 3 Reactivity: Fully integrated with Vue's reactivity system using Ref variables.
  • Composition-Friendly: Easy drop-in composable hooks (useWama) to manage loading, success, and error states dynamically inside <script setup> tags.

Usage

Here is a standard Vue 3 Single File Component (.vue) example:

<script setup lang="ts">
import { ref } from "vue";
import { useWama } from "@wa-ma/vue";

const recipient = ref("");
const message = ref("");

// Initialize the composable with your WhatsApp instance key
const { sendMessage, loading, success, error, messageId } = useWama({ proxyUrl: "/api/wama" });

const handleSend = async () => {
  await sendMessage(recipient.value, message.value);
};
</script>

<template>
  <div class="sender-card">
    <input 
      v-model="recipient" 
      placeholder="Recipient Number (e.g., +966501234567)" 
    />
    <textarea 
      v-model="message" 
      placeholder="Type message content here..."
    ></textarea>
    
    <button :disabled="loading" @click="handleSend">
      {{ loading ? "Sending..." : "Send via WhatsApp" }}
    </button>

    <div v-if="success === true" class="alert-success">
      🎉 Message queued! ID: {{ messageId }}
    </div>
    <div v-if="error" class="alert-error">
      ❌ Failed to send: {{ error }}
    </div>
  </div>
</template>

<style scoped>
.sender-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}
input, textarea {
  padding: 8px;
  border-radius: 4px;
}
button {
  cursor: pointer;
  padding: 10px;
}
.alert-success { color: green; }
.alert-error { color: red; }
</style>

Related Packages

axues

Vue composable powered by axios for easier request state management, axios + vue...

711 10
@craft-native/vue

Vue 3 bindings for Craft framework

18,250 21
@vue/composition-api

Provide logic composition capabilities for Vue.

7,353,877 4,179
@vt7/vue2-composables

Vue2 composables

523 1
vue-composition-global-subscription

A Component to handle global events and data

345

Version History

Version Released Vue License
0.2.0 ^3.0.0 MIT
0.1.2 ^3.0.0 Proprietary
0.1.1 ^3.0.0 MIT
0.1.0 ^3.0.0