Vue 3

Feedback widget
for Vue 3.

Use the vanilla SDK from any Vue setup function. No Vue-specific install needed.

The Usero SDK is framework-free. Initialize it once from your root component's onMounted hook, and the widget renders outside your Vue tree, so it cannot interfere with reactivity.

~12kb
gzipped
0
config
MIT
license
Install2 steps
> ~ install· bash
npm install @usero/sdk
> src/App.vue· vue
<script setup lang='ts'>
import { onBeforeUnmount, onMounted } from 'vue'
import { initUseroFeedbackWidget } from '@usero/sdk'

let widget: ReturnType<typeof initUseroFeedbackWidget> | null = null

onMounted(() => {
  widget = initUseroFeedbackWidget({ clientId: 'YOUR_CLIENT_ID' })
})

onBeforeUnmount(() => {
  widget?.destroy()
})
</script>

<template>
  <router-view />
</template>

Replace YOUR_CLIENT_ID with the id from your Usero dashboard.

Built for Vue 3

Why teams shipping with Vue 3 pick Usero.

No Vue wrapper required

The vanilla SDK is what powers the React component too. No second package to install.

Renders outside your tree

The widget mounts at the end of document.body, so Vue reactivity and Pinia stores never see it.

Composition API friendly

Initialize in onMounted, tear down in onBeforeUnmount. Clean, idiomatic Vue 3.

Tiny tree-shake footprint

Only one named export is imported. Nothing from the React build is pulled in.

Featurebase publishes a Vue plugin that adds a global property. Usero needs neither a plugin nor a provider.
vs Featurebase Vue plugin

Verify

Confirm it's working.

  1. Run your dev server and open the app in the browser.

  2. Confirm the feedback bubble appears bottom-right once the root component has mounted.

  3. Click it and check the panel opens over your Vue UI.

  4. Submit a test message and confirm the row shows up in your Usero inbox.

  5. Check the console for SSR or hydration warnings tied to the init call.

Troubleshooting

Common problems, Vue 3 edition.

Nothing shows up, and the build fails with "window is not defined".

initUseroFeedbackWidget touches the DOM, so it must run only in the browser. Call it inside onMounted, or guard it with if (import.meta.env.SSR === false). Never call it at the top level of <script setup>.

The widget does not appear under Nuxt.

Nuxt server-renders by default. Wrap the call in <ClientOnly>, guard it with if (import.meta.client), or move it into a *.client.ts plugin so it never runs during SSR.

The bubble appears twice after hot reload.

You are initializing on every render or without tearing down. Init once in onMounted and call widget?.destroy() in onBeforeUnmount so HMR replaces it cleanly.

I tried to make the widget reactive and it broke.

You do not need to. The widget renders into its own DOM root outside the Vue tree, so wrapping it in ref or reactive does nothing useful. Pass plain values to the init call.

TypeScript cannot find initUseroFeedbackWidget.

Import it from @usero/sdk (the vanilla entry), not @usero/sdk/react. Vue uses the framework-free build.

FAQ

Quick answers, Vue 3 edition.

Do I need a Vue-specific package?

No. The vanilla SDK works from any setup function. Vue, Nuxt, Quasar, and Ionic-Vue all use the same import.

Will it interfere with Pinia or Vue Router?

No. The widget renders into its own DOM root, outside the app element, so it never enters Vue's reactivity graph.

What about Vue 2?

Vue 2 is in maintenance mode. The vanilla SDK still works there too, just call initUseroFeedbackWidget in mounted().

How do I pass dynamic metadata?

Re-initialize the widget when the user logs in, passing metadata: { userId } to the init call.

Ship a feedback widget in your Vue 3 app today.

Free tier. No credit card. Two-minute install. Cancel by deleting two lines of code.

Get started free