Skip to Content
v0.8.0 · shippedNative mobile SDKs, optional Sentry enrichment, and bring-your-own keys/storage. Read the changelog →
SDK reference@mushi-mushi/vue

@mushi-mushi/vue

Vue 3 plugin + composables. Wraps @mushi-mushi/web — everything in the web SDK is available, with an idiomatic Vue 3 surface.

npm install @mushi-mushi/vue

Still on Vue 2? This adapter requires Vue 3. See the Vue 2 → Vue 3 migration guide — it walks through the bridge build and the Mushi-specific bits.

See Quickstart → Vue for the full setup walkthrough.

API surface

import { MushiPlugin, useMushi, useMushiReport } from '@mushi-mushi/vue'
ExportPurpose
MushiPluginapp.use(MushiPlugin, config) — installs the plugin and boots the SDK
useMushi()Returns the SDK singleton (composable)
useMushiReport()Returns { submit, isSubmitting, lastError }

Setup (Vite / Vue 3)

// main.ts import { createApp } from 'vue' import { MushiPlugin } from '@mushi-mushi/vue' import App from './App.vue' createApp(App) .use(MushiPlugin, { projectId: 'YOUR_PROJECT_ID', apiKey: 'YOUR_PUBLIC_API_KEY', }) .mount('#app')

Identifying users

<script setup lang="ts"> import { useMushi } from '@mushi-mushi/vue' import { useAuth } from './auth' const mushi = useMushi() const { user } = useAuth() watch(user, (u) => { if (u) mushi.identify(u.id, { email: u.email, name: u.name }) }) </script>

Submitting a report

<script setup lang="ts"> import { useMushiReport } from '@mushi-mushi/vue' const { submit, isSubmitting } = useMushiReport() </script> <template> <button :disabled="isSubmitting" @click="submit({ title: 'Something feels off', severity: 'p2' })"> Report issue </button> </template>
Last updated on